Re: Is linq the final straw for VB?
- From: Tom Shelton <tom_shelton@xxxxxxxxxxxxxxxxxx>
- Date: Sun, 15 Feb 2009 13:06:07 -0800
On 2009-02-15, Michel Posseth [MCP] <MSDN@xxxxxxxxxxx> wrote:
"Michael C" <mike@xxxxxxxxxx> schreef in bericht
news:uB92ocwjJHA.4028@xxxxxxxxxxxxxxxxxxxxxxx
"Michel Posseth [MCP]" <MSDN@xxxxxxxxxxx> wrote in message
news:OEUgCurjJHA.3380@xxxxxxxxxxxxxxxxxxxxxxx
<<<<< WARNING The following reflects my personal opinion regarding
postings like this >>>>>
My personal opinion is that it is a bit odd that people come here in the
VB.Net group for the sole reasson to bash VB
There are so manny things that are a lot easier in VB as in C# , do you
see anny of us posting this in the C# groups with offensive titles as
"is office interop the final straw for C# ? " just to call one or what
did you thought about optional and named parameters lots of succes with
that in C# ( at least until framework 4.0 )
Possibly they know deep down that C# is the better choice.
You confirm here my first point, this wasn`t a posting with a valid question
it was again just bashing VB
C# the better choice ? for a Java , C++ and all other mathmetatical syntax
developers it is , for a logical syntax developer or annyone who likes a
RAD language VB is the better choice .
Personally i believe that VB developers are overall more modest an logical
thinking people , they can see that every language suits a certain need , we
are more multicultural in terms of programming languages :-) , however the
bashers that come by in this group seem to believe in only one super
language and everything else has no right of existence and is inferior .
or no this one is also stil a favorite one of mine
C#
for (int i = 1; (i <= 10);
i = (i + 2))
{
// Do your stuff
}
or okay option 2 for (int i = 1; i <= 10; i += 2) { // Do your stuff
}VBFor i = 1 To 10 Step 2
'Do your stuff
Next
Pick the one that seems easiest to code and understand :-)
Well the c# syntax there is clearly superior because you can do anything
you like. Step can be a log function if you want and you can increment 2
variables which often comes in handy, eg
int* ptr = GetSomePointer();
for (int i = 1; i <= 10; i += 2, ptr++)
You can also have the upper limit being another variable that changes
during the loop if you really wanted to. So basically the syntax is
significantly more powerful and is only a few chrs longer.
But the thing is with these kind of discussions is the VBers always pick
some of the rare places in C# where there is more typing. As a whole there
is simply a lot more typing in VB.
Huh ? wel for the sake of your case you forgot the other points i made like
"optional and named parameters "
cause you do not have a valid alternative, for optional you could have
argued that method overloading is the valid way to mimic the same behavior ,
however this costs a lot more typing and would be pathetic in contradiction
to your above argument, so good for you that you did not step in that trap
.
It might be more typing, but I believe more correct. It isn't all about how
many keystrokes something takes you know - but, if you want to play that game
overall VB.NET requires more kestrokes for most activities...
But a lot more typing in VB ? hmmmm
if (Object.ReferenceEquals(a, b))
{
// variables refer to the same instance
}
Huh? I've use that construct only a handfull of times in the last nine years.
You would only use that in cases where you wanted to guarentee reference
equality. The vast majority of times:
if (a == b)
Is quite sufficient, and in fact what you want.
VS If a Is b Then
' variables refer to the same instance
End If
if ((a == null && b == null) || (a != null && b != null) && a.equals(b))
What the heck is that?
if (a == b)
{
}
accomplishes the same thing... I think your puposely trying to exagerate the
differences between the two langauges.
VSIf a = b Then
And about logic int [] ages = new int[n]; ( integer ages is new integer
var ages = new int[5];
Even so, int[] is a different type then int - which is true in VB.NET as well.
C# syntax makes you declare the type - in some cases that may result in longer
code then VB.NET syntax... Oh, well.
in n dimensions )VS Dim ages(n) as Integer ( Ages in n dimensions as
integer ) why do i have to tell C# 2 times wich datatype or object type it
is dealling with ?
Well technically, your not telling it twice. Your telling it the first time
with int[], the secont int[n] is calling the constructor.
Just some rare examples who seem to be not so rare do
they ? i can dig up a lot more if you want however honesty needs me to say
that i could also do the same against VB in favor of C# :-) and ofcourse if
() { }is a lot shorter as If () ThenEnd if
But the VB IDE team found something verry smart for that :-) , you only
Now your starting down a path that VB will loose badley on... The VB.NET IDE
is a mess and has been very much inferior to the C# experience since the 2005
release.
type If () and press enter and the IDE does the rest , a true RAD language
so does C#.
in a true RAD environment by the way you can discuss whateveryou want about
the language but a true fact is that the IDE of VB is superior to that of C#
in every way
Really, intellisense pops up at bad times, causing a lot of extaneous hitting
of the escape key. The auto-generating of imports statements sucks, because
it makes you complete the entire expression before and hit enter before it
suggests adding the import statement. Same with the auto implementation of
interfaces and abstract base classes...
No, the VB.NET IDE is in many ways it's greatest liablity, IMHO.
That is also the reasson why VB was a bit behind on C# in some
new features as the 2 dev teams focussed on 2 different points , C# dev team
language enhancements , VB dev team getting all the nice features back that
the VB6 IDE already had ( background compilation , debug,pause , change and
continue without recompiling etc etc etc... )
C# got E&C at the sametime VB.NET did. And as for background compile, that's
been a menace since day one for larger projects. Though, that may equalize
with the 2008 release since C# now has that as well. Though, I can honestly
say that on this old XP box, the C# ide still seems to be more responsive then
the VB.NET IDE - even with background compile.
and then enhance the IDE so it
has "more" to offer .>> IMHO :>> Both have there pro`s and con`s due to just
the simple fact that both dev >> teams give different priorities to some
implementations in the languages >> and syntaxtical> > The only real
advantage I can see with VB is the late binding office > automation thing.
I'm yet to try this to see what a real issue it is.yes indeed and all other
Automation , COM interop thingies especially when you want to use Late
bindingand ofcourse LINQ to XML wich is superior in VB at the moment and
I agree about COM interop - and maybe slightly on LINQ to XML... Some of the
inline xml stuff is nice. Overall though, LINQ in general is much nicer in
C#, because of it's fuller support for lamba expressions.
--
Tom Shelton
.
- Follow-Ups:
- Re: Is linq the final straw for VB?
- From: Michael C
- Re: Is linq the final straw for VB?
- References:
- Is linq the final straw for VB?
- From: Michael C
- Re: Is linq the final straw for VB?
- From: Michel Posseth [MCP]
- Re: Is linq the final straw for VB?
- From: Michael C
- Re: Is linq the final straw for VB?
- From: Michel Posseth [MCP]
- Is linq the final straw for VB?
- Prev by Date: Re: Is linq the final straw for VB?
- Next by Date: Re: Is an object in a resource file available to other people?
- Previous by thread: Re: Is linq the final straw for VB?
- Next by thread: Re: Is linq the final straw for VB?
- Index(es):
Relevant Pages
|