Notice in Visual Studio, if I have a Foreach command I can get intellisense for objects inside the block if I explicitly reference the Type of the item I am iterating over (Foreach Customer as Customer ...):
However, if I use the "lazy" VAR method, it will not give intellisense on the Customer object inside the Foreach loop (Foreach VAR Customer ...):
VAR vs. explicit Type references in Foreach command....
- lumberjack
- Posts: 727
- Joined: Fri Sep 25, 2015 3:11 pm
- Location: South Africa
VAR vs. explicit Type references in Foreach command....
Have you tested if in c# it actually does work during lazy var declaration?mattslay wrote:Notice in Visual Studio, if I have a Foreach command I can get intellisense for objects inside the block if I explicitly reference the Type of the item I am iterating over (Foreach Customer as Customer ...):
However, if I use the "lazy" VAR method, it will not give intellisense on the Customer object inside the Foreach loop (Foreach VAR Customer ...):
If yes, then it probably needs to get fixed.
If no, think you guess, if c# don't it is on the "nice" to-do list.
I do think it would be nifty if not in c# though but will not demand it then.
Regards,
______________________
Johan Nel
Boshof, South Africa
Johan Nel
Boshof, South Africa
VAR vs. explicit Type references in Foreach command....
Hi Matt,
that is where you discover that X# and it's Visual Studio integration is still a work-in-progress :
I can say that easily, because that's part of my task
I've started to add some support to VAR declarations, ie:
LOCAL obj AS TestClass
VAR guess:= obj:ToString()
Then if you type, guess:
you will have the members of String type in the list.
But you are right, FOREACH support is still to be done.
Fab.
that is where you discover that X# and it's Visual Studio integration is still a work-in-progress :
I can say that easily, because that's part of my task
I've started to add some support to VAR declarations, ie:
LOCAL obj AS TestClass
VAR guess:= obj:ToString()
Then if you type, guess:
you will have the members of String type in the list.
But you are right, FOREACH support is still to be done.
Fab.
XSharp Development Team
fabrice(at)xsharp.eu
fabrice(at)xsharp.eu
VAR vs. explicit Type references in Foreach command....
Johan - Yes, no compile-time errors, and indeed it runs just fine at execution time when I use the VAR method.lumberjack wrote: Have you tested if in c# it actually does work during lazy var declaration?
VAR vs. explicit Type references in Foreach command....
Fabrice - here is another issue...
Notice that even when I use explicit Type reference, if I then attempt to use the "i" prefix for interpolation inside a string using the {Object:Property} interpolation syntax, it does not give intellisense:
Notice that even when I use explicit Type reference, if I then attempt to use the "i" prefix for interpolation inside a string using the {Object:Property} interpolation syntax, it does not give intellisense:
VAR vs. explicit Type references in Foreach command....
Ok,...in my ToDo list...
As you can notice, nothing in VS Editor (Intellisense, QuickInfo, ...) is automatic; we have to implement all tools by ourselves, so some features are still missing, but we are making progress
As you can notice, nothing in VS Editor (Intellisense, QuickInfo, ...) is automatic; we have to implement all tools by ourselves, so some features are still missing, but we are making progress
XSharp Development Team
fabrice(at)xsharp.eu
fabrice(at)xsharp.eu
VAR vs. explicit Type references in Foreach command....
Matt,
To add to what Fabrice said: adding a new feature to the language and the compiler is sometimes easier than adding support for our language to VS.
Robert
To add to what Fabrice said: adding a new feature to the language and the compiler is sometimes easier than adding support for our language to VS.
Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
The Netherlands
robert@xsharp.eu
- lumberjack
- Posts: 727
- Joined: Fri Sep 25, 2015 3:11 pm
- Location: South Africa
VAR vs. explicit Type references in Foreach command....
Hi Matt,
It took courage to do what Robert took onto himself, no big corporate money backing him, for the love of the XBase language. He could have stopped there, VO/Vulcan community have a future. No he did not stop there, he made a commitment to unite the various XBase languages under 1 umbrella giving all of them the opportunity to step into .NET with a syntax close to what they used to. We need to give him support and a little bit of mercy for that, I believe we need to focus on the positives, e.g.
Trust me, Robert made VO2.5-2.8 what it was, otherwise VO would have died 15+ years ago. X# compared to VO/Vulcan is already miles ahead and I would say even ahead of c# in some cases. Yeah there are still users who bash VS and XIDE compared to the IDE in VO. Fact of the matter is, if I have Notepad I can produce code that the compiler can understand. I remember in my Clipper days, I used the Borland Turbo Pascal editor to do all my Clipper code in. No press of the button to compile/run. I was clever and could from exiting the TP IDE have my compiler going in a second, I just had to type "c" <Enter> lots of SET this and that in bat files, I was efficient. Done compiling hit "e" <enter> I am back in the editor where my cursor last was etc. Took split seconds. And no I don't want to use Notepad, XIDE and VS are miles ahead as editors/designers even with not implemented yet features.
Ok think you get my drift, not to chase you away, I just believe we need to see things in perspective. IDE is important, but I rather work with a crappy IDE than have a crappy compiler.
Just my ZAR 2c = US$0.02/14.667
We will speak soon again!
I agree that there are things not working, lots of these were already discussed many times, we as a user base currently accept and live with it for the moment. We know the pressure is on the DevTeam to deliver. We understand as a VO/Vulcan community where we came from. We were left in a situation similar to what you guys had with VFP 9.0. Vulcan gave hope to VO users, it did not deliver as promised/expected. X# is already a full feature rich language as is. To go that step further to put language packs in is remarkable. Not like MS announced, if you want a migration path, start learning VB.NET/c#. I think if X# was announced that is it, take it or leave it as is, in Core format, it is already a 100% better alternative than migrating to VB.NET/c#, it is not a total rewrite from scratch. It will take years for the current stable release to get so far behind c# that it is not usable anymore.mattslay wrote:Fabrice - here is another issue...
Notice that even when I use explicit Type reference, if I then attempt to use the "i" prefix for interpolation inside a string using the {Object:Property} interpolation syntax, it does not give intellisense:
It took courage to do what Robert took onto himself, no big corporate money backing him, for the love of the XBase language. He could have stopped there, VO/Vulcan community have a future. No he did not stop there, he made a commitment to unite the various XBase languages under 1 umbrella giving all of them the opportunity to step into .NET with a syntax close to what they used to. We need to give him support and a little bit of mercy for that, I believe we need to focus on the positives, e.g.
- How well does the X# compiler compares to c# feature wise
- How close are we already converting code from the VFP compiler syntax to X# syntax, etc.
- Is X# positioned correctly between the XBase world and .NET, etc.
- What features in X# is not supported in VFP, VO, Vulcan, Harbour, XBase++, etc.
- The power of the pre-processor, the XBase language is still evolving!
Trust me, Robert made VO2.5-2.8 what it was, otherwise VO would have died 15+ years ago. X# compared to VO/Vulcan is already miles ahead and I would say even ahead of c# in some cases. Yeah there are still users who bash VS and XIDE compared to the IDE in VO. Fact of the matter is, if I have Notepad I can produce code that the compiler can understand. I remember in my Clipper days, I used the Borland Turbo Pascal editor to do all my Clipper code in. No press of the button to compile/run. I was clever and could from exiting the TP IDE have my compiler going in a second, I just had to type "c" <Enter> lots of SET this and that in bat files, I was efficient. Done compiling hit "e" <enter> I am back in the editor where my cursor last was etc. Took split seconds. And no I don't want to use Notepad, XIDE and VS are miles ahead as editors/designers even with not implemented yet features.
Ok think you get my drift, not to chase you away, I just believe we need to see things in perspective. IDE is important, but I rather work with a crappy IDE than have a crappy compiler.
Just my ZAR 2c = US$0.02/14.667
We will speak soon again!
______________________
Johan Nel
Boshof, South Africa
Johan Nel
Boshof, South Africa