From VB to c#

  • Thread starter Thread starter Peter
  • Start date Start date
Rowe,

Goran is not using VB.Net he only sees it, by instance he does not know (as
I did some minutes ago) that writing a property in VB.Net takes half the
time as in C#, just because that as you have written: Public Property X as
Integer" you are almost ready because the most writting is than done
automaticly for you by the intelligent behaviour of VB.Net.

As C# would have the same intellisence, (which is in VB.Net even improved
again by the option Infer) then I maybe would find C# as good as VB.Net.

There are very few things I like in C# more then in VB.Net. Maybe the fact
that I don't have to write that crazy Dim statement, which is in my opinion
real from the old box as we say it here.

Cor
 
rowe_newsgroups said:
I think he is referring to the verbosity of Visual Basic compared to
C#.

What I meant is that there is literally half as many keywords in C# as
there is in VB.NET.

There are 77 keywords in C#.
There are 156 keywords in VB.NET.


I don't mind verbosity much. Typing isn't really that big a part of
programming, at least not if you are doing something that is the least
bit challenging. :)
 
Goran is not using VB.Net he only sees it, by instance he does not know (as
I did some minutes ago) that writing a property in VB.Net takes half the
time as in C#, just because that as you have written: Public Property X as
Integer" you are almost ready because the most writting is than done
automaticly for you by the intelligent behaviour of VB.Net.

You are definitely correct that the VB ide helps much more than the C#
one does when it comes to completing structures. This feature of the
IDE takes away Goran's argument of "less keywords means better
language."
As C# would have the same intellisence, (which is in VB.Net even improved
again by the option Infer) then I maybe would find C# as good as VB.Net.

Many times I wish that the VB intellisense box would open as soon as
you start typing a type/method name like it does with C#. That is
about the only thing I have against the VB ide - everything thing else
seems superior to me also.
There are very few things I like in C# more then in VB.Net. Maybe the fact
that I don't have to write that crazy Dim statement, which is in my opinion
real from the old box as we say it here.

I wouldn't mind having anonymous delegates (are they in Orcas?) or the
event declaration syntax that C# has.

Thanks,

Seth Rowe
 
Cor said:
Do you mean that you can do with C# half as much as in VB.Net?

Cor

Not at all. There is very little difference in what you can do with C#
and VB.NET.

You just don't have to learn as many keywords to do it in C#. :)
 
Cor said:
Don't pay attention to Goran, he is a lover of C# (you won't believe it)
in my eyes even more than Jon Skeet.

Don't pay any attention to Cor. Half of the time he doesn't know what
he's talking about, and the other half you can't tell what he's trying
to say... ;)
He comes often over here and tells than C# rules in this newsgroup

Not at all.

I come here (not "over here") often to answer questions.

Occationally I discuss languages.

Of the last 125 posts that I see in the newsgroup history, spanning the
last three months, only the posts in this thread has anything at all to
do with different languages.
 
Cor said:
Rowe,

Goran is not using VB.Net he only sees it, by instance he does not know
(as I did some minutes ago) that writing a property in VB.Net takes
half the time as in C#, just because that as you have written: Public
Property X as Integer" you are almost ready because the most writting is
than done automaticly for you by the intelligent behaviour of VB.Net.

If you really think that the typing is the hard part of programming, you
can't be doing very advanced programming...
 
Göran Andersson said:
C# was developed in the 21th century.

VB.NET was developed in the 21st century too.
That's not just the name. That's fundamental idea behind the language.

It's an all-purpose language opposed to C#, which is suitable for scenarios
in which object-orientation is the best solution only.
 
Göran Andersson said:
I fail to see how that has anything at all to do with philanthropy.
Perhaps you mean user-centered?


Programming is such a computer-centered task anyway, so making it case
insensetive doesn't really make is more user-centered.

Well, this question has been answered already years ago in HCI/usability
research. There is a broad consensus that case-sensitivity is a bad idea
for data primarily intended for processing by a human (which source code
is).
 
rowe_newsgroups said:
You are definitely correct that the VB ide helps much more than the C#
one does when it comes to completing structures. This feature of the
IDE takes away Goran's argument of "less keywords means better
language."

Please don't quote me on something that I have never said.

What I said was: "The C# language has half as many keywords as VB.NET,
so expect it to be easier to learn."

You still have to learn the language, even if the intellisense helps you
type it.
 
Thanks for all of your comments on my question,and now I can almost decide
to use VB still, bacause of it is not case sensitive,with My namespace,the
same OOP as C#, no need not type "£»" and so on. And I will go on with my
"Dim ... as ... "

Peter
 
I wouldn't mention that.

That... "what"?
I sayd many things.

Pehaps you will be able to say that
the day that "With" arrives to c# too !

I hope it never reach c#: With is a bed practice, but not for the clear of
the text of what I talken about.

In the meantime I would not bring out this argument.

Yes, it is not in this argument.

There are only a few limited applications which justify the use of
of that masochistic environment nowadays.

What environment?
But you never use subjects? :)

And for those you can write small libraries. No problem.

with .Net langages?

For the rest the c# IDE is just "crap" as someone (not me)
as already defined it *comparing* it to the vb's.

VS for C# is LOOOOOONG better that VS for VB.Net.
When I pass to VB.Net and I write I always think "why does not VS suggest
this as it does with c#?" "why does not VS help me with intellisense as it
does with c#?".

But did you tryed it? :)

You do in 10x what can be done in x.

Yes, write and debug in C# is really faster that in vb.net.

And this is what a vb6 lover thinks of vb.net ;)
 
The language C is much older, too. :)

What stuid flame.
Who look if vb/c++/c#/boo/php/pippirippì is older?

Whe are talking if one can know vb.net AND c# or only VB.Net.
 
You are definitely correct that the VB ide helps much more than the C#
one does when it comes to completing structures. This feature of the
IDE takes away Goran's argument of "less keywords means better
language."

VB.Net intellisense was much better that C# in VS2003, but in VS2005,
I think that gap has been closed. In VS2005 in C# for example, for a
property I need only type prop and press TAB and it inserts the entire
property skeleton. This is provided by the Code Snippets feature.
While VB.Net also supports code snippets, they don't work the same as
C#. Also in C#, as soon as I start typing anything, I immediately
get intellisense. That doesn't happen in VB.Net.

I'm not saying that makes C# superior, but the VB.Net IDE does not
really provide any advantage over C# IMO.

I think as a .Net developer, you should learn both languages because
you may need to read an example in one language that is not available
in another and being able to convert back and forth is a valuable
skill.

Chris
 
Hi,

The runtime capabilities of both languages are pretty much on par. The big
differences are more in the design time. There's some features in C# that
are useful such as anonymous delegates which VB will only have in part in VB
2008. But generally those features aren't really that important to me..
they are nice haves, but if the feature is really important VB usually
follows up and gets it in the version after C#. As far as major
functionality goes, I find VB to be a lot more productive.

Things such as:

- the My namespace
This makes it really easy to do a lot of simple tasks quick and easy via
My.Computer and My.User etc.

- Background compiler
When you fix a mistake you can tell immediately instead of having to do
a complete compile. This is huge on big projects.

- With blocks
I just love 'em

- Declarative event handling
makes it easy to see what code is wired to events as well as unwire
events (more robust abstraction)

- Code editing combo boxes.
The combo boxes in the code editor make it really easy to add events and
navigate objects inside your component

- Declarative interfaces
again the code is self explanatory

- late binding
helps when working with Office/COM and will be more important in dynamic
systems (DLR in VB 10)

- Optional Parameters
essential for working with Office

There's more than that, but The optional parameters one is one I like to
highlight. It shows VB is built around existing systems and working with
them. Consider this code to work with a dialog in Excel:

If xlApp.Dialogs(Excel.XlBuiltInDialog.xlDialogOpen).Show(sTextName) Then

Now there's the C# code:

if(xlApp.Dialogs[Excel.XlBuiltInDialog.xlDialogOpen].Show(sTextName,
Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing,
Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing,
Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing,
Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing,
Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing,
Type.Missing, Type.Missing, Type.Missing, Type.Missing)


And if I look at the next version of VB, VB9, due out end of this year -
January 2008, there's features C# doesn't have like a really cool experience
when working with XML. As Office moves to XML again VB is the language of
choice, the right tool for the job.

Seriously, if you are writing code like the C# code above, you are using the
wrong tool for the job, which then begs why use C# at all if you can learn
just one ? I still recommend people at least learn to read C#, but do
invest the time into learning the features of VB and you'll find, more often
than not it is the right tool to use :)
 
Herfried said:
It's an all-purpose language opposed to C#, which is suitable for
scenarios in which object-orientation is the best solution only.

VB.NET is object oriented too, but perhaps you missed that small detail?
 
Goran
VB.NET is object oriented too, but perhaps you missed that small detail?
I was lucky surprised to see this from you?

I think Herfried is pointing on the MY solution in VB.Net which started in
2.0 in our opinion (I think that in this sentence I can speak too for
Herfried)something to help the VB6 developer to make an easier step to
VB.Net.

I cannot say that I am really lucky with this, it is AFAIK something as
automatically creating static modules, something as it was in my eyes
terrible VB6. Not really object oriented programming.

Cor
 
Hi Goran,

Why you read all my messages through negative glasses. Mostly they are
positive meant, however I try to be honest, so sometimes I want to show you
a mirror.

Don't expect that I think I am without errors. I have made a lot of them in
my life.

However I tell always errors are the best learning school.

Cor
 
Back
Top