when is VB.Net getting anonymous delegates?

  • Thread starter Thread starter PJ6
  • Start date Start date
Tom,

Whereas I agree with you about VB having a wordier syntax ("End xxx" as
opposed to "}" is a good example), if you're holding its intellisense
features against it that's really a slam on VS and not the language itself.

Oh, I agree completely. But, it is often argued that the extra wordiness of
VB is offset by the intellisense in VS. I disagre with that, because the fact
is that the VB intellisense is in many cases not that good.
If you were writing both in Notepad and compiling via the command line, any
Intellisense advantages disappear. Of course if you were doing it that way,
you'd be writing an awful lot of "End Sub"'s in VB... :-)

Again, I agree. Believe, me - I've done a lot of coding in both C# and VB.NET
outside of the VS ide (I regularly mess with mono on my linux systems.
Sometimes, I use MonoDevelop - but, just as often I just fire up good old vim
:)
 
Which is precisely why I used this analogy, Cor. I just don't view C# and
VB.NET as two completely different languages which are worlds apart - I view
them as two very different dialects of the higher level .NET base language.

I would agree with this - for the most part, the two languages are very
similar in capability, they just have a different syntax for accomplishing it
:)
I may be wrong, but aren't there facilities in the CLR inside the CodeDom
namespace that allow a coder to programmatically generate code in either VB
or C# based on abstracted concepts like "insert a loop here" or
"conditionally do this or this"? If so, then the generator engine is
essentially proving my point - it takes a root langauge containing the
abstracted concepts and converts it into whichever dialect you choose.

Yep. In fact - I'm working on a series of articles for my blog on this topic.
Basically, I'm resurecting a pet project of mine :)
 
Tom Shelton said:
Oh, I agree completely. But, it is often argued that the extra wordiness
of
VB is offset by the intellisense in VS. I disagre with that, because the
fact
is that the VB intellisense is in many cases not that good.

That is true actually, and had I not played with C# here and there I
wouldn't believe it. There have been more than a few times (today) when
I've had to hammer away at the escape key just to clear away the clutter of
Intellisense windows popping up when they're not needed. I think people who
use VB so much and so often tend to think of Intellisense as virtually
perfect, but it really isn't without it's flaws.

In reality, if they're merging the VB & C# teams, they really should merge
the IDE development teams too. It strikes me that a good idea might be for
them to have some abstracted layer of common language features and maybe
some kind of embedded keyword database for VB/C# that describes how they're
utilised. That way the IDE should be able to just use that universal
abstract class, responding to keystrokes and providing Intellisense in a
consistent manner for both languages, the only difference being whether it
pops up with "}" or "End Sub" for example.
Again, I agree. Believe, me - I've done a lot of coding in both C# and
VB.NET
outside of the VS ide (I regularly mess with mono on my linux systems.
Sometimes, I use MonoDevelop - but, just as often I just fire up good old
vim
:)

Totally OT, but how have you found Mono on Linux to be? Is it's VB.NET
support decent, particularly surrounding WinForms? We're starting to look
at offering our apps on Mac/Linux but they're quite front-end heavy. I
would assume P/Invoke is out of the question for apps that are running on
Mono?


Thanks,
Alex
 
Alex,

Nederlands is een van de meest aan Engels gelieerde talen. Het doel van een
taal is communiceren. Toch zal dit in dit geval jouw waarschijnlijk alleen
lukken als je eerst een vertaalmachine gebruikt.

Iemand die in Amsterdam Nederlands gebruikt, schrijft het anders dan iemand
in Antwerpen. Toch kunnen ze elkaars tekst goed lezen zonder eerst een
cursus te nemen.

Dit is echter geheel verschillend voor personen die Engels en Amsterdams
praten. Ze verstaan elkaar niet. De tekst zal eerst moeten worden vertaald
naar een van de twee talen. Dit is natuurlijk niet het geval voor mensen die
Engels en Nederlands spreken net als bij C# en VB. Voor mensen die een taal
spreken die is afgeleid van dezelfde hogere taal is dit meestal eenvoudiger.

I have above tried to explain what I mean and that there is an important
difference between Cockey and Glaswegian with English and Dutch. If needed I
will translate it to English.

Cor
 
Alex Clark said:
That is true actually, and had I not played with C# here and there I
wouldn't believe it. There have been more than a few times (today) when
I've had to hammer away at the escape key just to clear away the clutter
of Intellisense windows popping up when they're not needed. I think
people who use VB so much and so often tend to think of Intellisense as
virtually perfect, but it really isn't without it's flaws.

That's an understatement :-) I had this same conversion when I was using VB
late last year with someone here who thought intellisense was pretty much
perfect in VB. When I started writing the faults down it even suprised me
how many I could come up with. Having to hit the escape key all day was my
number one annoyance, I think my number 2 was that it always defaulted to
an even when you typed a control name (eg Button1_Click instead of Button).
In all my years of programming i've never called an event so it's annoying
to be directed towards it every day. I can't remember the rest but there
were many issues with it that came up on a day to day basis.
 
Michael C said:
I used to be a VB6er and be very against the C style syntax but after
getting into it I much prefer it now. I had to do a vbnet project recently
after not using VB syntax for many years and realised what a flip I've
done. I just don't like typing all those extra words :-)

At least my version of VS 2008 inserts most of those extra words for me
automatically, and inserting the rest is a breeze because of IntelliSense.
 
Tom Shelton said:
Oh, I agree completely. But, it is often argued that the extra wordiness
of
VB is offset by the intellisense in VS. I disagre with that, because the
fact
is that the VB intellisense is in many cases not that good.

Well, it's not only IntelliSense. 'End *' is inserted automatically, for
example.
 
Well, it's not only IntelliSense. 'End *' is inserted automatically, for
example.

Yeah? And so are the } for a lot of constructs (code snippits) in C#... Not
all, but most of them...
 
That is true actually, and had I not played with C# here and there I
wouldn't believe it. There have been more than a few times (today) when
I've had to hammer away at the escape key just to clear away the clutter of
Intellisense windows popping up when they're not needed. I think people who
use VB so much and so often tend to think of Intellisense as virtually
perfect, but it really isn't without it's flaws.

In reality, if they're merging the VB & C# teams, they really should merge
the IDE development teams too. It strikes me that a good idea might be for
them to have some abstracted layer of common language features and maybe
some kind of embedded keyword database for VB/C# that describes how they're
utilised. That way the IDE should be able to just use that universal
abstract class, responding to keystrokes and providing Intellisense in a
consistent manner for both languages, the only difference being whether it
pops up with "}" or "End Sub" for example.


Totally OT, but how have you found Mono on Linux to be? Is it's VB.NET
support decent, particularly surrounding WinForms? We're starting to look
at offering our apps on Mac/Linux but they're quite front-end heavy. I
would assume P/Invoke is out of the question for apps that are running on
Mono?

Support for C# apps on Mono is pretty good. VB.NET still needs some work.

Winforms support is pretty much 100%. There are some obvious things, such as
no COM support and you can't be P/Invoking windows api's (though, you can
p/invoke linux libraries). And of course, WPF and Linq are out at the
momement. You also need to make sure your handling things like paths and
newlines in a platform independant way...

If you seriously are interested, there is a tool that can help you determine
what you need to do to make your app work on mono:

http://www.mono-project.com/MoMA

Hmmm... Not sure if it supports VB.NET though :)
 
Michael C said:
That's an understatement :-) I had this same conversion when I was using
VB late last year with someone here who thought intellisense was pretty
much perfect in VB. When I started writing the faults down it even
suprised me how many I could come up with. Having to hit the escape key
all day was my number one annoyance, I think my number 2 was that it
always defaulted to an even when you typed a control name (eg
Button1_Click instead of Button). In all my years of programming i've
never called an event so it's annoying to be directed towards it every
day. I can't remember the rest but there were many issues with it that
came up on a day to day basis.

Hmm.. let's see...

The event-name cropping up before the control name annoys me like crazy, and
I cannot even fathom a reason for it - it's not ordered alphabetically
because the event name is *longer* than the control name, and if the IDE
designers thought that VB coders are more likely to be calling a control's
event-handling sub directly rather than accessing members on the control
itself, they must really have a poor impression of us.

MyBooleanVar = ... is another one. Why does it default to *everything* in
the namespace, and just slowly narrow down as you type T R U E? Doesn't
take a leap of imagination to put True and False at the top of the list.
After that, they could've even listed all local boolean variables, all
boolean params passed into the sub/function, all class level booleans, and
*then* everything else.

New to VS2008 is statement completion of keywords, which is a double edged
sword. While it's saved some typing in a few areas, it's behaviour is
erratic at best. Typing "Public Pro.." at class level gives you
Intellisense but it *never* highlights the word "Property". I can only
assume that's a bug, not a feature.

Getting midway through a call to an overloaded sub, deciding you need to
quickly nip up to the top of your sub/function to declare a variable, and
realising that up-arrow is either (a) moving you through the Intellisense
list or (b) after pressing escape, moving you through the list of overloaded
signatures for the sub you're calling. ESCAPE ESCAPE ESCAPE ESCAPE. There
may not be much they can do about that, but it still grates on my nerves.

The day I found I could hold control to make Intellisense 90% transparent
was a happy one indeed, but it still tends to get in the way an awful lot.

I suppose we should be happy we have Intellisense at all. If my mother were
a coder, I'm sure she'd be saying "There are programmers in 3rd world
countries who don't have Intellisense at all! You think about that the next
time you complain about it!"

Speaking of which, they enabled Intellisense in the SQL Mgmt Studio IDE but
*not* in VS? I'm not sure about everyone else, but I tend to use VS for
writing/debugging stored procs, and Mgmt Studio for running quick queries.
As nice as it is in SMS, it would have been far more help if they'd built it
into VS. Ahh well, maybe by 2010...

-Alex
 
Alex Clark said:
Hmm.. let's see...

The event-name cropping up before the control name annoys me like crazy,
and I cannot even fathom a reason for it - it's not ordered alphabetically
because the event name is *longer* than the control name, and if the IDE
designers thought that VB coders are more likely to be calling a control's
event-handling sub directly rather than accessing members on the control
itself, they must really have a poor impression of us.

I really think they did a lot of this stuff on purpose just to steer people
towards c#.
MyBooleanVar = ... is another one. Why does it default to *everything* in
the namespace, and just slowly narrow down as you type T R U E? Doesn't
take a leap of imagination to put True and False at the top of the list.
After that, they could've even listed all local boolean variables, all
boolean params passed into the sub/function, all class level booleans, and
*then* everything else.

Yep :-)
New to VS2008 is statement completion of keywords, which is a double edged
sword. While it's saved some typing in a few areas, it's behaviour is
erratic at best. Typing "Public Pro.." at class level gives you
Intellisense but it *never* highlights the word "Property". I can only
assume that's a bug, not a feature.

On top of having to type keywords that c# doesn't even have, the
intellisense doesn't work with them correctly.
Getting midway through a call to an overloaded sub, deciding you need to
quickly nip up to the top of your sub/function to declare a variable, and
realising that up-arrow is either (a) moving you through the Intellisense
list or (b) after pressing escape, moving you through the list of
overloaded signatures for the sub you're calling. ESCAPE ESCAPE ESCAPE
ESCAPE. There may not be much they can do about that, but it still grates
on my nerves.

I love the way backspace brings up intellisense. That I find annoying and
leads to pushing esc all day.
 
Hi C# lovers,

Is this not more a discussion for the C# newsgroep (written as CSharp)?

There are probably much more people who like VB then C#.

They don't have to shout that every time loud.

Cor
 
Cor Ligthert said:
Hi C# lovers,

Is this not more a discussion for the C# newsgroep (written as CSharp)?

There are probably much more people who like VB then C#.

Hasn't that been proven false? ie figures showing that more people use C#
than VB.
They don't have to shout that every time loud.

No one's shouting, I thought this was a mature, factual discussion. That
appears to be something you're not usually very happy with. On several
occasions I've noticed you enter a thread with the deliberate intention of
turning it into an arguement.

Michael
 
Cor,

In terms of which language I like the best, my hat is always hanging on the
VB.NET tree. I just prefer VB to C#, but that doesn't make either language
"better" IMO.

However, the IDE problems with intellisense in VB are a valid problem. I
don't think MS created those problems intentionally to steer people towards
C#, but I do feel they were a bit slap-dash with the development and that
they spent more time, thought and effort on C# in this latest release - both
in linguistic and IDE terms.

I'm very encouraged by the news that MS will be merging the language teams -
people in this NG have been suggesting that for about 7 years now. I would
like to see VB return to being a true first rate citizen the way it
supposedly was when v1.0 of the framework was released.

If MS are serious about doing that, they'll need to listen to VB developers,
even up the features to match C#, and sort out the IDE issues (minor bugs
that cause major headaches).

Something else they absolutely need to do is go back to offering examples in
both languages. For a time, examples on the MS webby were actually biased
towards VB and this was a conscious decision by them. Then they went to
having examples in both languages, which I feel was a sensible choice. Now
the majority of examples for the new technologies in the framework seem to
be exclusively in C#, which I feel was a bad call by MS.

Hopefully they're planning to fix that as well.
 
Alex,

In the priority of Microsoft is the #1 programming language VB, the second
C++ and then C#.

However, I have also the opinion that C++ and C# are better languages to
make developer tools, while most of us make business application.

Therefore Microsoft developers did not always understand the problems from
those who are using their tools and the tool developers ware of course more
biased on C# when they make samples. I know that Microsoft has made a change
to get a better job to be done to overcome these problems.

I hear from C# developers often that in certain areas are only VB samples
while I hear VB developers that there are only those in C#.

I don't know the absolute figurs about that, but it is sure that in some
developing shops from Microsoft there is probably not even the knowledge to
do both programming languages. I don't like to see a by a tool translated C#
sample in VB. You can recognise that simple as you see how difficult the
event handlers are created. This is because that creating event handlers in
VB has so much more possibilities (and the same) then C#.

Cor
 
Michael C said:
Hasn't that been proven false? ie figures showing that more people use C#
than VB.


No one's shouting, I thought this was a mature, factual discussion. That
appears to be something you're not usually very happy with. On several
occasions I've noticed you enter a thread with the deliberate intention of
turning it into an arguement.

Michael
Hasn't that been proven false? ie figures showing that more people use C#
than VB.


http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html

But indeed VB is going down while C# is rising at the moment


regards

Michel
 
Cor Ligthert said:
Alex,

In the priority of Microsoft is the #1 programming language VB, the second
C++ and then C#.

Did you just invent that? Surely MS is more biased towards C style
languages.
However, I have also the opinion that C++ and C# are better languages to
make developer tools, while most of us make business application.

Maybe C++ but I don't see why
event handlers are created. This is because that creating event handlers
in VB has so much more possibilities (and the same) then C#.

Exactly what can you do with events in VB that c# can't do? Afaik the only
advantage VB has is a minor saving on keystrokes.

Michael
 
Michel,

I am glad that Transact SQL is accoording to this table almost nowhere used
anymore.

:-)

I assume that you understand that I say this as I though you are calling
it, sarcasme

:-)

Cor
 
Cor Ligthert said:
I don't like to see a by a tool translated C#
sample in VB. You can recognise that simple as you see how difficult the
event handlers are created. This is because that creating event handlers in
VB has so much more possibilities (and the same) then C#.

You want to explain that? Creating event handlers in VB and C#
normally follow different processes, but I wouldn't say that the VB
method has more possibilities (the reverse if anything, as it's easier
to have a universal event handler for things like finding inside a
combobox).
 
Back
Top