473,511 Members | 15,581 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

C# developers going back to vb.net

I don't know if I should even start this topic but here goes.
I'm an ex vb6 developer, now developing in C#.
The reason why I started developing in C# is because the company that I
worked for at the time standarised on C#.

Many of my friends working in previous companies that I worked for are
starting to move back to VB.Net. When I asked them why, it seems that
the next release of VB.Net seems very promising and they kinda see
themselves in the same position I'm in. It seems that at the time when
..Net was first released many companies basically forced developers to
work in C# because as in my case the company they worked for
standarised on C#, why these companies did this is beyond me because
most of their developers were vb developers, I think it's because it
was marketed that C# was the main language to use on the .Net
Framework.

Now many companies as well as management in these companies are
starting to realise that vb.net is not that different from c# and are
starting to give their developers a choice and thus obviously the move
back to vb.

The reason why I'm posting this topic here is because I'm wondering how
many developers using c# are ex vb developers and would actually like
to develop in vb.net. I have actually convinced my superiors to use
vb.net as another language choice and they have agreed.

We have just started a new project in vb.net about 3 mths ago and I
must say that it's still a damn fun language to work in, I'm actually
enjoying my work again. Productivity couldn't be higher as other c# (ex
vb6) developers in my department have also wanted to go back.

Wondering how many of you out there would like to move back to the
lighter side of life?

Nov 17 '05
132 5598
Well, yes, if you want to be perfectly literal about it. Even MS DOS was
"multi-tasking" in a technical sense, and this amounts to nit-picking, which
may make one subjectively feel superior, but contributes nothing to the
topic.

The point I was making was that C++ was developed at a time when low-level
programming was much safer, and programming in general was much simpler. I
wrote programs in C for DOS that performed interrupt calls back in the day,
did direct disk writes, etc. This would be catastrophic today, for the vast
majority of programming tasks. That is inarguable, and topical.

Forgive me, but I am much too old for geek swagger. At this point in my
life, I prefer to be creating powerful software, rather than comparing the
length of my "hardware."

--

Kevin Spencer
Microsoft MVP
..Net Developer
Big things are made up of
lots of little things.

"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:Or**************@TK2MSFTNGP10.phx.gbl...
Kevin,

C is almost equal to Unix an OS made especially to let a lot of students
use one computer (multi tasking) at the same time whithout having the
change that happens what students in that situation like to do the most.

http://en.wikipedia.org/wiki/C_%28pr...ng_language%29

:-)

Cor

Nov 17 '05 #51
Kevin,

May I ask you if you did understand the message from Adam and did you think
he was right in that.

I did not want to pick on every row as you forever do.

I showed him a place to investigate what he wrote in advance, something that
your message as shown in this thread lack as well very often.

Cor
Nov 17 '05 #52

Kevin Spencer wrote:
Do you know Wikipedia, there is a lot stated wrong in your message
Well, Cor, by your own nit-picking standards, your English *sucks*.


I rather think Cor was referring to content rather than form. And I
daresay his English is better than your whatever-his-native-tongue is.

http://www.ucl.ac.uk/internet-grammar/home.htm

Get over it, dude. There are more important (and helpful) things to do in
life than nit-pick. If you have a self-image problem, don't compensate. You
will only end up hating yourself even more. If you want to feel good about
yourself, try to make others feel good about themselves. What goes around
comes around.


Physician heal thyself!

--
Larry Lard
Replies to group please

Nov 17 '05 #53


"Kevin" wrote:
I don't know if I should even start this topic but here goes.
I'm an ex vb6 developer, now developing in C#.
The reason why I started developing in C# is because the company that I
worked for at the time standarised on C#.

Many of my friends working in previous companies that I worked for are
starting to move back to VB.Net. When I asked them why, it seems that
the next release of VB.Net seems very promising and they kinda see
themselves in the same position I'm in. It seems that at the time when
..Net was first released many companies basically forced developers to
work in C# because as in my case the company they worked for
standarised on C#, why these companies did this is beyond me because
most of their developers were vb developers, I think it's because it
was marketed that C# was the main language to use on the .Net
Framework.

Now many companies as well as management in these companies are
starting to realise that vb.net is not that different from c# and are
starting to give their developers a choice and thus obviously the move
back to vb.

The reason why I'm posting this topic here is because I'm wondering how
many developers using c# are ex vb developers and would actually like
to develop in vb.net. I have actually convinced my superiors to use
vb.net as another language choice and they have agreed.

We have just started a new project in vb.net about 3 mths ago and I
must say that it's still a damn fun language to work in, I'm actually
enjoying my work again. Productivity couldn't be higher as other c# (ex
vb6) developers in my department have also wanted to go back.

Wondering how many of you out there would like to move back to the
lighter side of life?


I started in vb.net and moved to a company that uses c#. I've been here for
almost 2 years and cannot see myself wanting to go back to vb.net. I have
nothing against it, I've just become very comfortable with c#.
Nov 17 '05 #54
Cor,

Afraid not sense make of you what I know. Headache is shown, dizzy forever
make me.

--

Kevin Spencer
Microsoft MVP
..Net Developer
Ambiguity has a certain quality to it.

"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:uL**************@TK2MSFTNGP12.phx.gbl...
Kevin,

May I ask you if you did understand the message from Adam and did you
think he was right in that.

I did not want to pick on every row as you forever do.

I showed him a place to investigate what he wrote in advance, something
that your message as shown in this thread lack as well very often.

Cor

Nov 17 '05 #55
You daresay a lot, Lard.

--

Kevin Spencer
Microsoft MVP
..Net Developer
Ambiguity has a certain quality to it.

"Larry Lard" <la*******@hotmail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...

Kevin Spencer wrote:
> Do you know Wikipedia, there is a lot stated wrong in your message


Well, Cor, by your own nit-picking standards, your English *sucks*.


I rather think Cor was referring to content rather than form. And I
daresay his English is better than your whatever-his-native-tongue is.

http://www.ucl.ac.uk/internet-grammar/home.htm

Get over it, dude. There are more important (and helpful) things to do in
life than nit-pick. If you have a self-image problem, don't compensate.
You
will only end up hating yourself even more. If you want to feel good
about
yourself, try to make others feel good about themselves. What goes around
comes around.


Physician heal thyself!

--
Larry Lard
Replies to group please

Nov 17 '05 #56
Well, a lively discussion, that's for sure.

As a conciencious manager getting ready to embark on a GUI development
project I would like to launch my developers on the best path and platform.
This is "blank sheet of paper" development and primarily new grads. They
will accept whatever language I place in front of them, and, unfortunately, I
haven't been able to gleen much from this conversation on which of the two
would be best. (I won't go too deaply into my programming background other
than to say that I still prefer assembly language - protected, unprotected,
object oriented, ... it's all op-codes).

Anyway, I want to get my newbies started on the right path. Is there REALLY
a difference between the two? Will I hit a dead end with one or the other?
When I read the code snippets, they look *structurally* identical - is this
not the case? Is VB.NET more like C# than it is like VB6?

Help me do right by me coders!

"Kevin" wrote:
I don't know if I should even start this topic but here goes.
I'm an ex vb6 developer, now developing in C#.
The reason why I started developing in C# is because the company that I
worked for at the time standarised on C#.

Many of my friends working in previous companies that I worked for are
starting to move back to VB.Net. When I asked them why, it seems that
the next release of VB.Net seems very promising and they kinda see
themselves in the same position I'm in. It seems that at the time when
..Net was first released many companies basically forced developers to
work in C# because as in my case the company they worked for
standarised on C#, why these companies did this is beyond me because
most of their developers were vb developers, I think it's because it
was marketed that C# was the main language to use on the .Net
Framework.

Now many companies as well as management in these companies are
starting to realise that vb.net is not that different from c# and are
starting to give their developers a choice and thus obviously the move
back to vb.

The reason why I'm posting this topic here is because I'm wondering how
many developers using c# are ex vb developers and would actually like
to develop in vb.net. I have actually convinced my superiors to use
vb.net as another language choice and they have agreed.

We have just started a new project in vb.net about 3 mths ago and I
must say that it's still a damn fun language to work in, I'm actually
enjoying my work again. Productivity couldn't be higher as other c# (ex
vb6) developers in my department have also wanted to go back.

Wondering how many of you out there would like to move back to the
lighter side of life?

Nov 17 '05 #57
Roger,

I have seen in the newsgroup dotNet.General the in my opinon best answer on
this over and over again asked question.

http://groups.google.com/group/micro...cce63bb7?hl=en

I hope this gives an idea

Cor
Nov 17 '05 #58
<"=?Utf-8?B?Um9nZXIgQm95ZXI=?=" <Roger
Bo***@discussions.microsoft.com>> wrote:
Well, a lively discussion, that's for sure.

As a conciencious manager getting ready to embark on a GUI development
project I would like to launch my developers on the best path and platform.
This is "blank sheet of paper" development and primarily new grads. They
will accept whatever language I place in front of them, and, unfortunately, I
haven't been able to gleen much from this conversation on which of the two
would be best. (I won't go too deaply into my programming background other
than to say that I still prefer assembly language - protected, unprotected,
object oriented, ... it's all op-codes).

Anyway, I want to get my newbies started on the right path. Is there REALLY
a difference between the two? Will I hit a dead end with one or the other?
When I read the code snippets, they look *structurally* identical - is this
not the case? Is VB.NET more like C# than it is like VB6?

Help me do right by me coders!


There are a few reasons why it's worth using VB.NET in some situations:

1) If your coders really prefer VB syntax (eg if they've been using VB
for years, don't like C#'s "symbol" approach, and are happy to learn
the differences between VB6 and VB.NET)

2) If you need to use a lot of late binding - it's a pain to do it from
C#, but with VB.NET you can just turn option strict off, and so long as
you get everything right, you'll be fine. Just don't complain when it
doesn't give compile-time errors :)

3) If you're doing the kind of COM interop where optional parameters
would be useful
Aside from those, I would suggest using C#, for the following reasons:

1) As it was designed specifically for the .NET framework, it's more
closely aligned to it. It doesn't have a load of legacy quirks - about
the quirkiest it gets is in the switch statement. Compare this with the
various oddities of VB.NET which are basically there for backwards
compatibility, for instance the String "Nothing" handling.

2) It encourages you to do the right thing, by and large. None of this
"Option Strict Off" stuff (by default, no less!). No passing properties
by reference. More explicit event handling which makes it crystal clear
when you're subscribing to an event and when you're unsubscribing. The
"using" statement (coming to VB.NET in VS 2005, I believe).

3) It uses more standard terminology than VB.NET - null, internal etc.

4) XML doc comments (coming to VB.NET in VS 2005).

5) The language is smaller, and thus easier to learn. You need to learn
the .NET framework, of course, just as you do in VB.NET - but without
all the extras which are basically there for backwards compatibility.

There are specific things you can do in C# that you can't do in VB.NET
(just as there are some the other way round, as shown above) but these
aren't generally very important - unsafe code is very rarely useful to
most people. Operator overloading can occasionally be nice, but it's
more that it's great on some of the system types (TimeSpan, DateTime)
than that it's important to be able to overload yourself.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Nov 17 '05 #59
In message <MP************************@msnews.microsoft.com >, Jon Skeet
<?@pobox.com.invalid> writes
Aside from those, I would suggest using C#, for the following reasons:


<-- Snip -->

Another consideration; my former employer migrated from VB6 to C#. I was
involved in the process of reviewing CVs and interviewing candidates for
developer positions, both before and after the migration. We had great
difficulty finding VB6 developers of the calibre we wanted. Lots of
applicants, very, very few of them any good. Conversely, when we
advertised C# jobs we had fewer applicants but ended up choosing between
a number of superb candidates. We weren't offering any more money for
the C# guys.

Now, I realise that at the time C# was very new and that the people who
had acquired those skills were a self-selecting group. They were mostly
ex-C++ people or else people who were sick of banging their heads on
VB6's limitations and wanted a change. Things may have changed since
then, but I suspect that a lot of the people we rejected for those VB6
jobs now have VB.NET on their CV, and not C#.

So, not a comment on the relative merits of the languages, but a comment
on the ease of finding good developers amongst the two camps. I'm not
saying that there aren't good VB.NET developers, far from it, rather
that they may be harder to find.

--
Steve Walker
Nov 17 '05 #60
Jon, et. al.,

#2 wins the day!!! New engineers need external discipline until they are
experienced enough to know when they can bend the rules. Syntax, RAD, and
features aside, I'm investing in the new folks and want them to develop good
habits.

Many thanks,
Roger

"Jon Skeet [C# MVP]" wrote:
<snip>
2) It encourages you to do the right thing, by and large. None of this
"Option Strict Off" stuff (by default, no less!). No passing properties
by reference. More explicit event handling which makes it crystal clear
when you're subscribing to an event and when you're unsubscribing. The
"using" statement (coming to VB.NET in VS 2005, I believe).


Nov 17 '05 #61
Jon,

5) The language is smaller, and thus easier to learn. You need to learn
the .NET framework, of course, just as you do in VB.NET - but without
all the extras which are basically there for backwards compatibility.


The first part of this sentence is something I don't dare to write because
of the reactions that will be, when I write it. (I had written it in a
message and than decided to take the message from Tom Dacon to overcome
needles discussions)

Except that the extra's are not only for compatibility. However, the impact
of those extra's are almost the same as you write about the extra's from C#.

:-)

Cor
Nov 17 '05 #62
Cor Ligthert [MVP] <no************@planet.nl> wrote:
5) The language is smaller, and thus easier to learn. You need to learn
the .NET framework, of course, just as you do in VB.NET - but without
all the extras which are basically there for backwards compatibility.


The first part of this sentence is something I don't dare to write because
of the reactions that will be, when I write it. (I had written it in a
message and than decided to take the message from Tom Dacon to overcome
needles discussions)

Except that the extra's are not only for compatibility. However, the impact
of those extra's are almost the same as you write about the extra's from C#.


If the extras aren't just there for compatibility, could you explain
why they *are* there? There are plenty of VB.NET functions which have
identical functionality to "normal" .NET framework methods. Why have
redundant functions other than for the sake of compatibility?

C# has a very *few* "extras" which are syntactic sugar (lock and using
are the primary ones which come to mind). It has a couple of operators
such as typeof(...) which give compile time safety and efficiency. It
*doesn't* have reams of functions built into the language like VB.NET
does.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Nov 17 '05 #63
Jon,

If the extras aren't just there for compatibility, could you explain
why they *are* there? There are plenty of VB.NET functions which have
identical functionality to "normal" .NET framework methods. Why have
redundant functions other than for the sake of compatibility?

Exactly as you wrote, "plenty of" not all and it is even a minority,
however I don't think that this C# newsgroup is the right place for that,
maybe we can discuss this sometime when this question comes up again in the
"General" newsgroup.

(I try to use consequent 'methods' by the way, using 'functions' is for me a
kind of backward compatibility with Excel.)

Cor
Nov 17 '05 #64
Roger Boyer wrote:
Well, a lively discussion, that's for sure.

As a conciencious manager getting ready to embark on a GUI
development project I would like to launch my developers on the best
path and platform. This is "blank sheet of paper" development and
primarily new grads. They will accept whatever language I place in
front of them, and, unfortunately, I haven't been able to gleen much
from this conversation on which of the two would be best. (I won't
go too deaply into my programming background other than to say that I
still prefer assembly language - protected, unprotected, object
oriented, ... it's all op-codes).

Anyway, I want to get my newbies started on the right path. Is there
REALLY a difference between the two? Will I hit a dead end with one
or the other? When I read the code snippets, they look structurally
identical - is this not the case? Is VB.NET more like C# than it is
like VB6?


You're in the C# newsgroup, so I wouldn't expect an answer like "Use
VB.NET!" ;).

VB.NET 1.x (on .NET 1.x) has some shortcomings compared to C#, they
corrected that in the upcoming .NET 2.0 / VB.NET 2005. You don't always
run into these either, but they're there (no operator overloading, no
ability to use implicit conversion methods etc.).

That said, for the productivity of the team, I'd use the language
which appeals the most to the majority of the developers. Even if they
never used VB.NET nor C#, it still can be important, because it might
be they think in the mindset of a C# programmer or a VB.NET programmer.

FB

--
------------------------------------------------------------------------
Get LLBLGen Pro, productive O/R mapping for .NET: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------
Nov 17 '05 #65
I never thought the day would come I would say anything in favor of ...
VB, but here it goes ;) ->

Jon Skeet [C# MVP] wrote:
Aside from those, I would suggest using C#, for the following reasons:

1) As it was designed specifically for the .NET framework, it's more
closely aligned to it. It doesn't have a load of legacy quirks -
about the quirkiest it gets is in the switch statement. Compare this
with the various oddities of VB.NET which are basically there for
backwards compatibility, for instance the String "Nothing" handling.
still, the VB.NET select case statement is IMHO more powerful. I find
the C# switch statement the most lamest version of a switch statement
you could possibly design, for the sole reason that it has:
- lame 'break' statement which is completely redundant (no fall through
supported)
- because of no fall through, you have to use 'goto'. So, using
spagetti with goto is preferred over having fallthrough.. I don't get
it.
- VB.NET's select case has range filters for the case clauses, which
are very powerful.
3) It uses more standard terminology than VB.NET - null, internal etc.
Isn't this subjective?
There are specific things you can do in C# that you can't do in
VB.NET (just as there are some the other way round, as shown above)
but these aren't generally very important - unsafe code is very
rarely useful to most people. Operator overloading can occasionally
be nice, but it's more that it's great on some of the system types
(TimeSpan, DateTime) than that it's important to be able to overload
yourself.


I disagree. For starters, implicit conversion operators are VERY
important and you're probably using them every day without noticing
them, but you can't use them in VB.NET (or you have to use the dreaded
op_Implicit...)

Also, operator overloading is underestimated a lot as well. For
example, I've managed to create a 'linq-ish' language with operator
overloading alone to create typed, compiletime checked filters for my
O/R mapper, a few other O/R mappers like genome and I believe also db4o
use similar constructs.

I find it a pity that C# doesn't allow you to define your own
operators as well, because there are just a few operators to overload.
So while I can do:
IPredicate f = (CustomerFields.CompanyName=="Microsoft");

It's harder to create a simple construct to write a subquery filter as
the operator(s) required aren't definable like 'IN'. (with C# 3.0, this
ofcourse changes).

Frans

--
------------------------------------------------------------------------
Get LLBLGen Pro, productive O/R mapping for .NET: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------
Nov 17 '05 #66
Cor Ligthert [MVP] wrote:
Jon,

If the extras aren't just there for compatibility, could you explain
why they are there? There are plenty of VB.NET functions which have
identical functionality to "normal" .NET framework methods. Why have
redundant functions other than for the sake of compatibility?

Exactly as you wrote, "plenty of" not all and it is even a minority,
however I don't think that this C# newsgroup is the right place for
that, maybe we can discuss this sometime when this question comes up
again in the "General" newsgroup.


Dont backtrack now, show the list of stuff which ISN'T there for
backwards compatibility and stuff added deliberately to the language to
make it 'better'

FB

--
------------------------------------------------------------------------
Get LLBLGen Pro, productive O/R mapping for .NET: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------
Nov 17 '05 #67
Frans,
Don't backtrack now, show the list of stuff which ISN'T there for
backwards compatibility and stuff added deliberately to the language to
make it 'better'
If you challenge me, I don't like to show it here, there as I wrote there
are better places for that.

See almost all converting methods, they do more than only function as a
wrapper around the parse or convert.

See especially some date methods, which surely extend the Net functions.

There are as well inbuilt financial methods and mathematical methods which
are not as that in the Net.

http://msdn.microsoft.com/library/de...rykeywords.asp

Be aware that I was agreeing with Jon that some are redundant, in that case
I use the Net methods, while I absolute do not use methods which use the one
as indexer because that confuses me, by instance the vb collection. Most of
the ones active in languages.vb newsgroup have the idea that the
vb.collection should have been placed in the visualbasic compatible
namespace. Not unlikely that you are confused by it, that the compatible
namespace is a separated namespace.

Of course can you can make all those methods yourself. However, I started
with only very few instructions and could do everything. I tell often that
I only need an If, a branch conditional, an add and the possibility to shift
to negative to be able to do everything. However, don't ask me how much time
that takes.

Cor
"Frans Bouma [C# MVP]" <pe******************@xs4all.nl> schreef in bericht
news:xn***************@news.microsoft.com... Cor Ligthert [MVP] wrote:
Jon,
>
> If the extras aren't just there for compatibility, could you explain
> why they are there? There are plenty of VB.NET functions which have
> identical functionality to "normal" .NET framework methods. Why have
> redundant functions other than for the sake of compatibility?
>

Exactly as you wrote, "plenty of" not all and it is even a minority,
however I don't think that this C# newsgroup is the right place for
that, maybe we can discuss this sometime when this question comes up
again in the "General" newsgroup.


Dont backtrack now, show the list of stuff which ISN'T there for
backwards compatibility and stuff added deliberately to the language to
make it 'better'

FB

--
------------------------------------------------------------------------
Get LLBLGen Pro, productive O/R mapping for .NET: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------

Nov 17 '05 #68
> I find
the C# switch statement the most lamest version of a switch statement
you could possibly design, for the sole reason that it has:
As much as I love C#, this is also one of my pet peeves, and I certainly
don't see the logic in it. It doesn't make C# any "safer." It reminds me of
the sort of thing that VB does to prevent developers from accidentally
creating logical errors. The "break" statement should stay, but the "no
fall-through" rule is monumentally stupid.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Ambiguity has a certain quality to it.

"Frans Bouma [C# MVP]" <pe******************@xs4all.nl> wrote in message
news:xn***************@news.microsoft.com...I never thought the day would come I would say anything in favor of ...
VB, but here it goes ;) ->

Jon Skeet [C# MVP] wrote:
Aside from those, I would suggest using C#, for the following reasons:

1) As it was designed specifically for the .NET framework, it's more
closely aligned to it. It doesn't have a load of legacy quirks -
about the quirkiest it gets is in the switch statement. Compare this
with the various oddities of VB.NET which are basically there for
backwards compatibility, for instance the String "Nothing" handling.


still, the VB.NET select case statement is IMHO more powerful. I find
the C# switch statement the most lamest version of a switch statement
you could possibly design, for the sole reason that it has:
- lame 'break' statement which is completely redundant (no fall through
supported)
- because of no fall through, you have to use 'goto'. So, using
spagetti with goto is preferred over having fallthrough.. I don't get
it.
- VB.NET's select case has range filters for the case clauses, which
are very powerful.
3) It uses more standard terminology than VB.NET - null, internal etc.


Isn't this subjective?
There are specific things you can do in C# that you can't do in
VB.NET (just as there are some the other way round, as shown above)
but these aren't generally very important - unsafe code is very
rarely useful to most people. Operator overloading can occasionally
be nice, but it's more that it's great on some of the system types
(TimeSpan, DateTime) than that it's important to be able to overload
yourself.


I disagree. For starters, implicit conversion operators are VERY
important and you're probably using them every day without noticing
them, but you can't use them in VB.NET (or you have to use the dreaded
op_Implicit...)

Also, operator overloading is underestimated a lot as well. For
example, I've managed to create a 'linq-ish' language with operator
overloading alone to create typed, compiletime checked filters for my
O/R mapper, a few other O/R mappers like genome and I believe also db4o
use similar constructs.

I find it a pity that C# doesn't allow you to define your own
operators as well, because there are just a few operators to overload.
So while I can do:
IPredicate f = (CustomerFields.CompanyName=="Microsoft");

It's harder to create a simple construct to write a subquery filter as
the operator(s) required aren't definable like 'IN'. (with C# 3.0, this
ofcourse changes).

Frans

--
------------------------------------------------------------------------
Get LLBLGen Pro, productive O/R mapping for .NET: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------

Nov 17 '05 #69
Frans Bouma [C# MVP] <pe******************@xs4all.nl> wrote:
I never thought the day would come I would say anything in favor of ...
VB, but here it goes ;) ->

Jon Skeet [C# MVP] wrote:
Aside from those, I would suggest using C#, for the following reasons:

1) As it was designed specifically for the .NET framework, it's more
closely aligned to it. It doesn't have a load of legacy quirks -
about the quirkiest it gets is in the switch statement. Compare this
with the various oddities of VB.NET which are basically there for
backwards compatibility, for instance the String "Nothing" handling.
still, the VB.NET select case statement is IMHO more powerful. I find
the C# switch statement the most lamest version of a switch statement
you could possibly design, for the sole reason that it has:
- lame 'break' statement which is completely redundant (no fall through
supported)
- because of no fall through, you have to use 'goto'. So, using
spagetti with goto is preferred over having fallthrough.. I don't get
it.
- VB.NET's select case has range filters for the case clauses, which
are very powerful.


Yes, VB.NET's select is indeed more powerful - although it's really
only the equivalent of

if (...)
{
}
else if (...)
{
}

as far as I know. Does it use the same switch/case IL construct
(whatever that is - I haven't looked into it) that C# does where it's
able to?
3) It uses more standard terminology than VB.NET - null, internal etc.


Isn't this subjective?


No, I don't think so. Look at the terminology the CLI specification -
it talks in largely C#-friendly terms such as "this" and "null" rather
than "Me" and "Nothing".

Plenty of other languages use the concepts of "this" and "null" too -
how many others use "Me" and "Nothing"?
There are specific things you can do in C# that you can't do in
VB.NET (just as there are some the other way round, as shown above)
but these aren't generally very important - unsafe code is very
rarely useful to most people. Operator overloading can occasionally
be nice, but it's more that it's great on some of the system types
(TimeSpan, DateTime) than that it's important to be able to overload
yourself.


I disagree. For starters, implicit conversion operators are VERY
important and you're probably using them every day without noticing
them, but you can't use them in VB.NET (or you have to use the dreaded
op_Implicit...)


That's why I said that it's great on system types, but that you rarely
need to write your own operator overloads.
Also, operator overloading is underestimated a lot as well. For
example, I've managed to create a 'linq-ish' language with operator
overloading alone to create typed, compiletime checked filters for my
O/R mapper, a few other O/R mappers like genome and I believe also db4o
use similar constructs.

I find it a pity that C# doesn't allow you to define your own
operators as well, because there are just a few operators to overload.
So while I can do:
IPredicate f = (CustomerFields.CompanyName=="Microsoft");

It's harder to create a simple construct to write a subquery filter as
the operator(s) required aren't definable like 'IN'. (with C# 3.0, this
ofcourse changes).


Personally, I think that when you get into too many operators and
implicit conversions, the code becomes very hard to read. Just my
experience of C++ though...

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Nov 17 '05 #70
Kevin Spencer <ke***@DIESPAMMERSDIEtakempis.com> wrote:
I find
the C# switch statement the most lamest version of a switch statement
you could possibly design, for the sole reason that it has:


As much as I love C#, this is also one of my pet peeves, and I certainly
don't see the logic in it. It doesn't make C# any "safer." It reminds me of
the sort of thing that VB does to prevent developers from accidentally
creating logical errors. The "break" statement should stay, but the "no
fall-through" rule is monumentally stupid.


I'd go the other way. Falling through has proved buggy in many, many
C/C++ programs. I'd go for implicit breaks and still avoiding falling
through - or possibly have an explicit "continue" if you want to fall
through, to make it obvious that it's not just an omission.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Nov 17 '05 #71
Jon,

This is not cricket.
Plenty of other languages use the concepts of "this" and "null" too -
how many others use "Me" and "Nothing"?

All those language derive from C. You probably know more which use "this"
and "null". VBNet derives from standard Basic, I doubt if the amount of
users in these two environments are very much apart from each other.

I don't agree with your 'if', however don't find it worthfull to argue with
you about that in the context of this thread. (Has nothing to do with you
personally)

Cor
Nov 17 '05 #72
> I'd go the other way. Falling through has proved buggy in many, many
C/C++ programs. I'd go for implicit breaks and still avoiding falling
through - or possibly have an explicit "continue" if you want to fall
through, to make it obvious that it's not just an omission.
I guess it's just the Libertarian in me. I prefer to take responsibility for
myself. And the falling through is so convenient.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Ambiguity has a certain quality to it.

"Jon Skeet [C# MVP]" <sk***@pobox.com> wrote in message
news:MP************************@msnews.microsoft.c om... Kevin Spencer <ke***@DIESPAMMERSDIEtakempis.com> wrote:
> I find
> the C# switch statement the most lamest version of a switch statement
> you could possibly design, for the sole reason that it has:


As much as I love C#, this is also one of my pet peeves, and I certainly
don't see the logic in it. It doesn't make C# any "safer." It reminds me
of
the sort of thing that VB does to prevent developers from accidentally
creating logical errors. The "break" statement should stay, but the "no
fall-through" rule is monumentally stupid.


I'd go the other way. Falling through has proved buggy in many, many
C/C++ programs. I'd go for implicit breaks and still avoiding falling
through - or possibly have an explicit "continue" if you want to fall
through, to make it obvious that it's not just an omission.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too

Nov 17 '05 #73
Kevin Spencer <ke***@DIESPAMMERSDIEtakempis.com> wrote:
I'd go the other way. Falling through has proved buggy in many, many
C/C++ programs. I'd go for implicit breaks and still avoiding falling
through - or possibly have an explicit "continue" if you want to fall
through, to make it obvious that it's not just an omission.


I guess it's just the Libertarian in me. I prefer to take responsibility for
myself. And the falling through is so convenient.


It's very occasionally convenient in my experience, but I *have* had
bugs where I've fallen through accidentally.

I like the language to try to stop me from shooting myself in the foot.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Nov 17 '05 #74
Cor Ligthert [MVP] <no************@planet.nl> wrote:
This is not cricket.
Plenty of other languages use the concepts of "this" and "null" too -
how many others use "Me" and "Nothing"?
All those language derive from C.
Really? Here's a small sample of the languages which have a "null"
concept:

Delphi
CIL
Perl
C
C++
Java
JavaScript
SQL
COBOL

Do you really want to claim that *all* of those derive from C? Even
VBScript has Null!
You probably know more which use "this"
and "null". VBNet derives from standard Basic, I doubt if the amount of
users in these two environments are very much apart from each other.
Which Basic do you mean by "standard Basic"? I've used at least 5
different versions of Basic, and VB is the only one I've come across
with "Me" and "Nothing".

For me, however, the most important thing is that the .NET framework's
standard terminology is to use "null" and "this". Look at the libraries
- do you see DbNothing, or the IsNothingable or IsNothing property? Do
you see it talked about in the spec? Where is
"NothingReferenceException"?

VB.NET is the language which sticks out here, IMO.
I don't agree with your 'if', however don't find it worthfull to argue with
you about that in the context of this thread. (Has nothing to do with you
personally)


<shrug> Any time you feel like discussing it, I'm open to it.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Nov 17 '05 #75
> That's why I said that it's great on system types, but that you rarely need to write your own operator overloads.

I find I need to write my own operator overloads just about as often as
I need to create my own value types.

Which, I admit, isn't very often, but I found it odd that VB.NET
allowed me to create my own value types but not overload operators. At
least they fixed that in Whidbey.

(In passing, I can't help but point out that this article on operator
overloading in VB.NET;

http://msdn.microsoft.com/vbasic/whi...verloading.asp

has an example of creating a complex number _class_. Now why on earth
would anyone want a complex number reference type...?)

Nov 17 '05 #76
In message <11**********************@g14g2000cwa.googlegroups .com>,
Bruce Wood <br*******@canada.com> writes
http://msdn.microsoft.com/vbasic/whi...=/library/en-u
s/dnvs05/html/vboperatoroverloading.asp

has an example of creating a complex number _class_. Now why on earth
would anyone want a complex number reference type...?)


A good question; surely it should have value type semantics. However, I
found the same kind of thing in my own code today; a Money class, rather
than a Money struct. It's got a reference to an instance of Currency and
a quantity:double.

I've got a Thing which has a property of Amount:Money. Thing has a
static Empty:Thing property which returns a new instance of
EmptyThing:Thing. EmptyThing is a private inner class. Thing overrides
Equals to say that two Things with the same ID are equal. EmptyThing
initialise its ID immutably to -1 so that always Thing.EmptyThing ==
Thing.EmptyThing. I specifically didn't want a shared static instance of
EmptyThing because some of its properties *are* mutable. This convention
works well, the pattern is repeated throughout the system and there is
code within the DB access layer which treats an ID of -1 as dbnull. I
think a single magic number per system isn't too bad :o)

There's a custom webcontrol which takes a collection of Thing and
generates a table displaying a row for the details of each Thing, with
Save and Delete buttons. It also inserts a row at the end which displays
an instance of EmptyThing with an add button.

[Off topic, any comments on this architecture?]

The issue I dealt with today was a request that the empty row be
initialised to the values of the row before it, because usually all of
the Things in a collection had most of the values the same. So I added a
Mimic(Thing thingToCopy) method to Thing which copies the properties of
thingToCopy to the instance which it is called upon (I wanted
specifically to modify the instance of EmptyThing, which creates a whole
new worry for me about the id==id equality test, but ignore that for
now). At which point I noticed [getting back on topic] that Money was a
reference type, and that setting this.amount = thingToCopy.amount would
potentially cause problems if I changed the quantity or currency of
amount.

So, back to Bruce's complex number, why did I originally code something
with obviously value-type semantics as a reference type? I like to think
that I'm reasonably conscientious and careful about this kind of thing,
and I've understood the difference for as long as I've been using C#. I
can only imagine that when I wrote the code, at the back of my mind, I
had the concept that value types were for optimisation of performance
rather than for representing things which really do have value
semantics. If I'd thought about it the choice would have been obvious; I
obviously didn't. Java developers must have to put up with not being
able to do this properly all time, .NET developers should be able to
make the right choice.

I'm slightly ashamed to say that I didn't change Money to a struct, I
created a new instance of money with the quantity and currency from the
instance I copied. I did this because I didn't want to track down any
other references to the class which relied on reference-type semantics.
I suppose the question this whole thing poses is whether the emphasis on
the function of value types has been skewed away from their role in
modelling a system and towards their use for performance purposes; have
we spent too much time arguing over whether or not scenarios induce
boxing when we should really have been thinking about whether an entity
was correctly modelled by a reference or value type? Also, I don't
recall any way of differentiating the two in UML; surely this is an
analysis decision, not a coding technicality?

What do you think?

Worth a new thread to discuss?

--
Steve Walker
Nov 17 '05 #77
Actually, I think that it would unprofessional to comment on my style of
writing or language versus the actual content. That might make you an MUP,
and as you already figured out, UP stands for unprofessional.
Second, if you don't understand the content while others did then your
problem is not with me, it is in you, maybe you need more training sessions,
check it out.
Finally, learn to reply to the content or don't reply, unless you want your
name to be published every were and that would keep you holding your MVP!

This is my first unproductive post on any forum, but I couldn't help myself
because you've invited me to start hating you and I accepted it!

"Cor Ligthert [MVP]" wrote:
Kevin,

May I ask you if you did understand the message from Adam and did you think
he was right in that.

I did not want to pick on every row as you forever do.

I showed him a place to investigate what he wrote in advance, something that
your message as shown in this thread lack as well very often.

Cor

Nov 17 '05 #78
Adam,
Actually, I think that it would unprofessional to comment on my style of
writing or language versus the actual content.


Can you tell me where I wrote that in my reply to Kevin? I will be probably
the last one who not completely agrees about that with you. In fact it was
Kevin who did that.

My reply had nothing to do with your style of writing it had to do with the
fact that Kevin gave me the idea that he had not even read your message and
therefore was only trolling my reply to you.

In my opinion are there some things in the content of your original answer
that makes that probably not much people will read it after they have seen
this starting sentence.
C# syntex is derived from the mother of all languages C++


AFAIK is C# the only language derived from C++.

I had read your message completely and had the idea that I understood
everything you wrote. I had the idea that most maybe came from your hart but
is not based on much investigation

Therefore I gave you the link to Wikepedi, I assume that you would not be
glad when I was only copying the content of that in a message.

Cor
Nov 17 '05 #79
Thanks for explaining pal, maybe I needed to ask more before I reply back and
maybe your first reply should have included the "mother of all languages"
thing so I would have understood what is going on.
What I meant by saying that C++ is the mother of all languages is that C#,
PHP, Java, JavaScript and others that I don't know tried to follow the syntax
of C/C++! Well, how far they went varies between one language and another and
undoubtly C# was the pioneer.
My comments comparing C# versus VB.NET is emotional, I agree on that, and
such topic requires emotional rather than logical answers.
Sorry for being unpolite, this is a lesson for me to listen more than I
speak and believe me I am working on it :)

"Cor Ligthert [MVP]" wrote:
Adam,
Actually, I think that it would unprofessional to comment on my style of
writing or language versus the actual content.


Can you tell me where I wrote that in my reply to Kevin? I will be probably
the last one who not completely agrees about that with you. In fact it was
Kevin who did that.

My reply had nothing to do with your style of writing it had to do with the
fact that Kevin gave me the idea that he had not even read your message and
therefore was only trolling my reply to you.

In my opinion are there some things in the content of your original answer
that makes that probably not much people will read it after they have seen
this starting sentence.
C# syntex is derived from the mother of all languages C++


AFAIK is C# the only language derived from C++.

I had read your message completely and had the idea that I understood
everything you wrote. I had the idea that most maybe came from your hart but
is not based on much investigation

Therefore I gave you the link to Wikepedi, I assume that you would not be
glad when I was only copying the content of that in a message.

Cor

Nov 17 '05 #80
Jon Skeet [C# MVP] wrote:
Kevin Spencer <ke***@DIESPAMMERSDIEtakempis.com> wrote:
I find
the C# switch statement the most lamest version of a switch
statement you could possibly design, for the sole reason that it
has:


As much as I love C#, this is also one of my pet peeves, and I
certainly don't see the logic in it. It doesn't make C# any
"safer." It reminds me of the sort of thing that VB does to prevent
developers from accidentally creating logical errors. The "break"
statement should stay, but the "no fall-through" rule is
monumentally stupid.


I'd go the other way. Falling through has proved buggy in many, many
C/C++ programs. I'd go for implicit breaks and still avoiding falling
through - or possibly have an explicit "continue" if you want to fall
through, to make it obvious that it's not just an omission.


I see your point, and I also understand that implicit fall-through
implies an order in which the case statements are written which also is
a source for problems.

I would love to have a keyword, continue or what ever, which suggests
proper fallthrough or some other flow, so I can avoid replicating small
code snippets, like:
switch(foo)
{
case 1:
DoA();
break;
case 2:
DoA();
DoB();
break;
}

etc.

FB
--
------------------------------------------------------------------------
Get LLBLGen Pro, productive O/R mapping for .NET: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------
Nov 17 '05 #81
Jon Skeet [C# MVP] wrote:
Frans Bouma [C# MVP] <pe******************@xs4all.nl> wrote:
I never thought the day would come I would say anything in favor of
... VB, but here it goes ;) ->

Jon Skeet [C# MVP] wrote:
Aside from those, I would suggest using C#, for the following
reasons:

1) As it was designed specifically for the .NET framework, it's
more closely aligned to it. It doesn't have a load of legacy
quirks - about the quirkiest it gets is in the switch statement.
Compare this with the various oddities of VB.NET which are
basically there for backwards compatibility, for instance the
String "Nothing" handling.


still, the VB.NET select case statement is IMHO more powerful. I
find the C# switch statement the most lamest version of a switch
statement you could possibly design, for the sole reason that it
has: - lame 'break' statement which is completely redundant (no
fall through supported)
- because of no fall through, you have to use 'goto'. So, using
spagetti with goto is preferred over having fallthrough.. I don't
get it.
- VB.NET's select case has range filters for the case clauses, which
are very powerful.


Yes, VB.NET's select is indeed more powerful - although it's really
only the equivalent of

if (...)
{
}
else if (...)
{
}

as far as I know. Does it use the same switch/case IL construct
(whatever that is - I haven't looked into it) that C# does where it's
able to?


I didn't check when I posted, but I did a small check and you're right!

VB code:
Sub Main()
Dim i As Int32
i = 42
Select Case i
Case 0 To 10
Console.WriteLine("10s")
Case 11 To 42
Console.WriteLine("rest")
End Select
End Sub

C# decompiled code:
[STAThread]
public static void Main()
{
int num2 = 0x2a;
if ((num2 >= 0) && (num2 <= 10))
{
Console.WriteLine("10s");
}
else if ((num2 >= 11) && (num2 <= 0x2a))
{
Console.WriteLine("rest");
}
}

I think, with strings it's also not able to use the optimization the C#
compiler uses with a static hashtable, because of the if's. (if you're
using case string1 to string2
3) It uses more standard terminology than VB.NET - null, internal
etc.


Isn't this subjective?


No, I don't think so. Look at the terminology the CLI specification -
it talks in largely C#-friendly terms such as "this" and "null"
rather than "Me" and "Nothing".

Plenty of other languages use the concepts of "this" and "null" too -
how many others use "Me" and "Nothing"?


Not much, but how many languages NOT related to C-derived languages
use 'this' and 'null' ?

I agree, 'Me' is pretty silly, but 'Nothing' makes sense in a way.
What I find way more irritating is the type declaration AFTER the
variable (Dim foo As SomeType), because that makes porting code to
VB.NET pretty cumbersome
Also, operator overloading is underestimated a lot as well. For
example, I've managed to create a 'linq-ish' language with operator
overloading alone to create typed, compiletime checked filters for
my O/R mapper, a few other O/R mappers like genome and I believe
also db4o use similar constructs.

I find it a pity that C# doesn't allow you to define your own
operators as well, because there are just a few operators to
overload. So while I can do:
IPredicate f = (CustomerFields.CompanyName=="Microsoft");

It's harder to create a simple construct to write a subquery filter
as the operator(s) required aren't definable like 'IN'. (with C#
3.0, this ofcourse changes).


Personally, I think that when you get into too many operators and
implicit conversions, the code becomes very hard to read. Just my
experience of C++ though...


Agreed, but IMHO that's also up to the developer of course. In any
language you can write unreadable code. With the proper operators you
can make code MORE readable than it is now and definitely make it more
usable for developers. KEY part of that of course is that the operators
you overload are logical to the constructs they're used with. In C# we
have 1 bad example of that, the '+' sign for string concatenation
(IMHO): '+' stands for an addition, i.e. a mathematical action, but you
can't apply that kind of action on a string (in theory).

FB
--
------------------------------------------------------------------------
Get LLBLGen Pro, productive O/R mapping for .NET: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------
Nov 17 '05 #82
Bruce Wood wrote:
That's why I said that it's great on system types, but that you
rarely need to write your own operator overloads.


I find I need to write my own operator overloads just about as often
as I need to create my own value types.

Which, I admit, isn't very often, but I found it odd that VB.NET
allowed me to create my own value types but not overload operators. At
least they fixed that in Whidbey.

(In passing, I can't help but point out that this article on operator
overloading in VB.NET;

http://msdn.microsoft.com/vbasic/whi...ll=/library/en
-us/dnvs05/html/vboperatoroverloading.asp

has an example of creating a complex number class. Now why on earth
would anyone want a complex number reference type...?)


I'd reverse that: why on earth do we need value types? I mean, I
understand they speed things up internally, but why should I be
bothered with that? Because there are value-types, we still have stupid
hacks for nullable ints in C#, even in .NET 2.0. C++ doesn't have
slowdowns when it comes to using pointers to ints, managed code does,
which is kind of odd, when you consider the machine the managed code is
used in is virtual, e.g.: you can make it act like you want it to act.
However a corner-cutting action bleeded through into the languages:
value types.

FB
--
------------------------------------------------------------------------
Get LLBLGen Pro, productive O/R mapping for .NET: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------
Nov 17 '05 #83
Frans Bouma [C# MVP] <pe******************@xs4all.nl> wrote:

<snip>
Plenty of other languages use the concepts of "this" and "null" too -
how many others use "Me" and "Nothing"?
Not much, but how many languages NOT related to C-derived languages
use 'this' and 'null' ?


See my reply to Cor - SQL, Perl and VBScript, for starters.
I agree, 'Me' is pretty silly, but 'Nothing' makes sense in a way.
But it's not the same as the terminology elsewhere - and as VB.NET
developers are likely to have to read things other than VB.NET (such as
the CLI spec) it's an extra set of terminology to learn.
What I find way more irritating is the type declaration AFTER the
variable (Dim foo As SomeType), because that makes porting code to
VB.NET pretty cumbersome


Right.
It's harder to create a simple construct to write a subquery filter
as the operator(s) required aren't definable like 'IN'. (with C#
3.0, this ofcourse changes).


Personally, I think that when you get into too many operators and
implicit conversions, the code becomes very hard to read. Just my
experience of C++ though...


Agreed, but IMHO that's also up to the developer of course. In any
language you can write unreadable code. With the proper operators you
can make code MORE readable than it is now and definitely make it more
usable for developers. KEY part of that of course is that the operators
you overload are logical to the constructs they're used with. In C# we
have 1 bad example of that, the '+' sign for string concatenation
(IMHO): '+' stands for an addition, i.e. a mathematical action, but you
can't apply that kind of action on a string (in theory).


I think adding two strings together is pretty intuitive myself, but
there are plenty of people who've suggested operators they want to
overload but haven't been able to (thankfully). To be able to introduce
your own extra operators would make things even worse, IMO.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Nov 17 '05 #84
Frans,

It is in my opinion not relevant if it is with your sample technical right.
The documentive power from the "select case" start where we get code like
beneath.

VB code:
Sub Main()
Dim i As Integer = 42
Select Case i
Case 1,5, 7, 19, 39
Console.WriteLine("first form")
Case 11, 9, 10, 24, 28
Console.WriteLine("second form")
Case Else
Console.WriteLine("not on a form")
End Select
End Sub

(Any relation with a Lotto form is pure coincidence)

In the way you showed the code I will forever prefer an "if else".

Cor
Nov 17 '05 #85
Jon,

But it's not the same as the terminology elsewhere - and as VB.NET
developers are likely to have to read things other than VB.NET (such as
the CLI spec) it's an extra set of terminology to learn.

First I thought, Jon has here a point.

However, than I thought is "null" not very much a representation to a very
old historic binary null situation in physical memory addresses (in by
instance the code part of the machine code), which represent *nothing*
assigned.

Does Nothing than not more reflect the way as a symbolic language has to
deal with it?

Just a thought,

Cor
Nov 17 '05 #86
Jon,

Rereading the message from Frans, do I think that he has a *kind* of same
opinion.

Frans, I can be wrong of course in that.

Cor
Nov 17 '05 #87
Cor Ligthert [MVP] wrote:
Jon,

Rereading the message from Frans, do I think that he has a kind of
same opinion.

Frans, I can be wrong of course in that.


The philosophy of VB(.NET) is that the language should represent
english speak as much as possible.

so if you want to test if a variable points to void, you could say:
If foo Is Nothing Then
'...
End If

Which IMHO makes sense, in the scope of that philosophy, although you
could also argue:
If foo Is Void Then

or

If foo References Nothing Then
(which I would find even more readable)

defining 'null' as 'undefined' is IMHO the result indeed of having a
pointer set to 0x0000.0000 as a unified 'undefined' value.

FB
--
------------------------------------------------------------------------
Get LLBLGen Pro, productive O/R mapping for .NET: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------
Nov 17 '05 #88
Cor Ligthert [MVP] <no************@planet.nl> wrote:
But it's not the same as the terminology elsewhere - and as VB.NET
developers are likely to have to read things other than VB.NET (such as
the CLI spec) it's an extra set of terminology to learn.

First I thought, Jon has here a point.

However, than I thought is "null" not very much a representation to a very
old historic binary null situation in physical memory addresses (in by
instance the code part of the machine code), which represent *nothing*
assigned.

Does Nothing than not more reflect the way as a symbolic language has to
deal with it?


I don't think it's particularly relevant - the point is that VB.NET
developers still need to know what null is, because so much of the
documentation, specifications etc refer to it. Why learn two ways of
saying the same thing, if you can instead learn a language which uses
the more common way of talking about things?

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Nov 17 '05 #89
Hi Adm,

Peronally, I understood your remark about "the mother of all languages." It
was beside the point to point out the minor technical issue. In fact, C was
written to look more or less like Pascal, so one might argue, with
Lillipution intent, that Pascal was the "mother of all languages." Still, it
would indeed be pointless to do so.

I appreciated your enthusiasm, and, regardless of the occasional
technicality, I found your arguments for the most part quite understandable.
In fact, as it was an expression of opinion, and not a factual answer to a
question, I considered it less important that it should be "absolutely
factually correct" (if that is possible, considering the vagaries of
language).

It irritates me to see people publicly correct others without some
valid/helpful reason for doing so. If, for example a person asks a question,
and a person responding speaks without knowledge, and therefore leads the OP
down the wrong path to a solution, I feel it necessary to correct the person
responding, and provide the correct information. This helps the OP to find
the solution they seek. On the other hand, when a person is asked for an
opinion and gives it, and is incorrect on some minor technical point, who is
harmed by it? Why should the person venturing the opinion be publicly
corrected for their perceived and minor error? Who is helped by it? The only
conclusion I can draw from such behavior is that ther person doing the
correcting is attempting to elevate public perception of their knowledge at
another person's expense. And that is both unnecessary and uncalled-for.

It took 4 years for Microsoft to develop the first version of the .Net
platform. I will be the first person to admit that I don't know everything
about it. I do, however, know how to research, and am quite good at that.
When I first began to program, I relied heavily on help from others who were
farther along the path than I. Now I feel a sense of responsibility to do
the same. That is my motivation. I help when I can, and keep silent when I
can not.

I did feel a certain need to step in to your defense. I don't like to see
people bullied. And I can hold my own in a scuffle. I don't mind a knock or
two here and there. I can give as good as I get. I am confident in my
professional life, and not afraid of the opinions of others. They cannot
harm me professionally, and I have a thick skin. So, from time to time I
will step in to defend someone else. Call me a glutton for punishment.

But don't feel bad that you may have somehow embarassed yourself with your
contribution. I found it quite refreshing! :)

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Ambiguity has a certain quality to it.

"Adam Tibi" <Ad******@discussions.microsoft.com> wrote in message
news:DD**********************************@microsof t.com...
Thanks for explaining pal, maybe I needed to ask more before I reply back
and
maybe your first reply should have included the "mother of all languages"
thing so I would have understood what is going on.
What I meant by saying that C++ is the mother of all languages is that C#,
PHP, Java, JavaScript and others that I don't know tried to follow the
syntax
of C/C++! Well, how far they went varies between one language and another
and
undoubtly C# was the pioneer.
My comments comparing C# versus VB.NET is emotional, I agree on that, and
such topic requires emotional rather than logical answers.
Sorry for being unpolite, this is a lesson for me to listen more than I
speak and believe me I am working on it :)

"Cor Ligthert [MVP]" wrote:
Adam,
> Actually, I think that it would unprofessional to comment on my style
> of
> writing or language versus the actual content.


Can you tell me where I wrote that in my reply to Kevin? I will be
probably
the last one who not completely agrees about that with you. In fact it
was
Kevin who did that.

My reply had nothing to do with your style of writing it had to do with
the
fact that Kevin gave me the idea that he had not even read your message
and
therefore was only trolling my reply to you.

In my opinion are there some things in the content of your original
answer
that makes that probably not much people will read it after they have
seen
this starting sentence.
>>C# syntex is derived from the mother of all languages C++


AFAIK is C# the only language derived from C++.

I had read your message completely and had the idea that I understood
everything you wrote. I had the idea that most maybe came from your hart
but
is not based on much investigation

Therefore I gave you the link to Wikepedi, I assume that you would not be
glad when I was only copying the content of that in a message.

Cor

Nov 17 '05 #90
Hi Kevin,

Thank you for this nice reply and thank you for defending me.

Have a nice weekend

"Kevin Spencer" wrote:
Hi Adm,

Peronally, I understood your remark about "the mother of all languages." It
was beside the point to point out the minor technical issue. In fact, C was
written to look more or less like Pascal, so one might argue, with
Lillipution intent, that Pascal was the "mother of all languages." Still, it
would indeed be pointless to do so.

I appreciated your enthusiasm, and, regardless of the occasional
technicality, I found your arguments for the most part quite understandable.
In fact, as it was an expression of opinion, and not a factual answer to a
question, I considered it less important that it should be "absolutely
factually correct" (if that is possible, considering the vagaries of
language).

It irritates me to see people publicly correct others without some
valid/helpful reason for doing so. If, for example a person asks a question,
and a person responding speaks without knowledge, and therefore leads the OP
down the wrong path to a solution, I feel it necessary to correct the person
responding, and provide the correct information. This helps the OP to find
the solution they seek. On the other hand, when a person is asked for an
opinion and gives it, and is incorrect on some minor technical point, who is
harmed by it? Why should the person venturing the opinion be publicly
corrected for their perceived and minor error? Who is helped by it? The only
conclusion I can draw from such behavior is that ther person doing the
correcting is attempting to elevate public perception of their knowledge at
another person's expense. And that is both unnecessary and uncalled-for.

It took 4 years for Microsoft to develop the first version of the .Net
platform. I will be the first person to admit that I don't know everything
about it. I do, however, know how to research, and am quite good at that.
When I first began to program, I relied heavily on help from others who were
farther along the path than I. Now I feel a sense of responsibility to do
the same. That is my motivation. I help when I can, and keep silent when I
can not.

I did feel a certain need to step in to your defense. I don't like to see
people bullied. And I can hold my own in a scuffle. I don't mind a knock or
two here and there. I can give as good as I get. I am confident in my
professional life, and not afraid of the opinions of others. They cannot
harm me professionally, and I have a thick skin. So, from time to time I
will step in to defend someone else. Call me a glutton for punishment.

But don't feel bad that you may have somehow embarassed yourself with your
contribution. I found it quite refreshing! :)

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Ambiguity has a certain quality to it.

"Adam Tibi" <Ad******@discussions.microsoft.com> wrote in message
news:DD**********************************@microsof t.com...
Thanks for explaining pal, maybe I needed to ask more before I reply back
and
maybe your first reply should have included the "mother of all languages"
thing so I would have understood what is going on.
What I meant by saying that C++ is the mother of all languages is that C#,
PHP, Java, JavaScript and others that I don't know tried to follow the
syntax
of C/C++! Well, how far they went varies between one language and another
and
undoubtly C# was the pioneer.
My comments comparing C# versus VB.NET is emotional, I agree on that, and
such topic requires emotional rather than logical answers.
Sorry for being unpolite, this is a lesson for me to listen more than I
speak and believe me I am working on it :)

"Cor Ligthert [MVP]" wrote:
Adam,

> Actually, I think that it would unprofessional to comment on my style
> of
> writing or language versus the actual content.

Can you tell me where I wrote that in my reply to Kevin? I will be
probably
the last one who not completely agrees about that with you. In fact it
was
Kevin who did that.

My reply had nothing to do with your style of writing it had to do with
the
fact that Kevin gave me the idea that he had not even read your message
and
therefore was only trolling my reply to you.

In my opinion are there some things in the content of your original
answer
that makes that probably not much people will read it after they have
seen
this starting sentence.

>>C# syntex is derived from the mother of all languages C++

AFAIK is C# the only language derived from C++.

I had read your message completely and had the idea that I understood
everything you wrote. I had the idea that most maybe came from your hart
but
is not based on much investigation

Therefore I gave you the link to Wikepedi, I assume that you would not be
glad when I was only copying the content of that in a message.

Cor


Nov 17 '05 #91
>> Peronally, I understood your remark about "the mother of all languages."
It
was beside the point to point out the minor technical issue. In fact, C
was
written to look more or less like Pascal, so one might argue, with
Lillipution intent, that Pascal was the "mother of all languages." Still,
it
would indeed be pointless to do so.


And ALGOL 60 is the mother of Pascal. Does that mean ALGOL is C#'s
great-grandmother?

Or that Delphi is C#'s great-aunt? :)
Nov 17 '05 #92
Here's how it will look in boo, just for comparison:
http://boo.codehaus.org/

i = 42
given i:
when 1,5,7,19,39:
print "first form"
when 11,9,10,24,28:
print "second form"
otherwise:
print "not on a form"

or your other example:

i = 42
given i:
when 0 <= i <= 10
print "10s"
when 11 <= i <= 42
print "rest"

http://jira.codehaus.org/browse/BOO-136

I'm not saying it's better or worse or anything.

To the guy who's deciding about what language to use for new hires, I'd
probably recommend C# if they are already familiar with java or C++
(which is likely if they are CS grads).

Nov 17 '05 #93
Michael,

And ALGOL 60 is the mother of Pascal. Does that mean ALGOL is C#'s
great-grandmother?

Or that Delphi is C#'s great-aunt? :)

I think that you are right, however in my opinion is Algol not completely
the mother of all languages.

I think that it can be called that for all by mainly Beta's used languages.
The sister Cobol can in my opinion be seen as a mother of all languages for
the "Alpha's".

Strange enough are that much less while they have AFAIK a very broad public
that uses them.

Cor
Nov 17 '05 #94

Cor Ligthert [MVP] wrote:
Michael,

And ALGOL 60 is the mother of Pascal. Does that mean ALGOL is C#'s
great-grandmother?

Or that Delphi is C#'s great-aunt? :)

I think that you are right, however in my opinion is Algol not completely
the mother of all languages.

I think that it can be called that for all by mainly Beta's used languages.
The sister Cobol can in my opinion be seen as a mother of all languages for
the "Alpha's".

Strange enough are that much less while they have AFAIK a very broad public
that uses them.

Cor


http://www.levenez.com/lang/history.html#01

Nov 17 '05 #95
Hi,

Thanks,

http://www.levenez.com/lang/history.html#01


Very interesting.

Cor
Nov 17 '05 #96
Sigh. Some months back I was waging a battle on this front... I guess
it didn't have much effect. :-)

Yes, in a few situations, structs offer performance benefits. You can
see typical uses in this regard in System.Drawing.Point and
System.Drawing.Rectangle, among others. They're things that by rights
ought to have reference semantics that were made into structs for
performance reasons, I think. At least, I can't think of any other
reason to create _mutable_ value types and suffer the resulting
confusion among programmers using your class library.

That said, value types are incredibly... um, valuable... when it comes
to modeling things that are _values_. I'm going to try very, very hard
not to believe that you're honestly suggesting that ints should have
been reference types. Do you really believe that this code:

int a = 5;
int b = a;
a = 16;
Console.Writeline("{0}", b);

should write 16? Can you imagine how difficult it would be wrap your
mind around programming in a language with only reference semantics?
Just imagining the mayhem makes my head hurt. :) If memory serves,
even venerable LISP, the everything-is-a-reference-type language, took
pains to avoid this.

Complex numbers, money (quantity plus currency), measures (quantity
plus unit of measure) and other such things are natural value types.
For the complex numbers example,

int a = new Complex(5, 1);
int b = a;
a *= a;

should leave b containing [5, 1] as before, not [-25, 0], which is what
a would contain (pardon if I made an error there... I haven't worked
with complex numbers in 20 years). In other words, the thing should act
like a value, not like an object with reference semantics. As Steve
Walker pointed out, when I add $5.00 and $0.25 and put the result back
in the original variable, I really don't want every $5.00 quantity in
my system to change to $5.25. That would be nasty.

Sorry for the rant, but it drives me nuts when people start building
Customer structs, saying that it's "more efficient", and then wonder
why their code does all these weird things. It drives me even crazier
to know that Microsoft has a (VB) example of how to use structs in
their knowledge base that shows a Customer struct with a half-dozen
fields. Aaaargh!

Nov 17 '05 #97
"Bruce Wood" wrote...
That said, value types are incredibly... um, valuable... when it comes
to modeling things that are _values_. I'm going to try very, very hard
not to believe that you're honestly suggesting that ints should have
been reference types. Do you really believe that this code:

int a = 5;
int b = a;
a = 16;
Console.Writeline("{0}", b);

should write 16? Can you imagine how difficult it would be wrap your
mind around programming in a language with only reference semantics?
Just imagining the mayhem makes my head hurt. :)


I don't see this as a good example on what you mean. Why should it write 16?
When you're assigning a literal to a variable, you could say you're
assigning another object, not changing the objects contents.

int a = 5;
int b = a; // Is now referencing 5
a = 16; // Is now referencing 16
Console.Writeline("{0}", b);

b is still referencing 5

Try this for comparison:

string a = "Hello";
string b = a; // Is now referencing "Hello"
a = "World"; // Is now referencing "World"
Console.Writeline("{0}", b);

b is still referencing "Hello".
This is really no different than:

Customer a = new Customer("Bill");
Customer b = a; // Is now referencing Bill
a = new Customer("Bob"); // Is now referencing Bob
Console.WriteLine("{0}", b);

b is still referencing "Bill"

So the traditional logic when using primitives or value types shouldn't
necessarily need to change just because they became reference types instead.
At least no changes that I can see at the moment. I think much lies in how
to define the behaviour of the operators.

But there still might be other issues with using only reference types rather
than having both value and reference types... ;-)

// Bjorn A


Nov 17 '05 #98
Point taken. My examples weren't very good, as you pointed out. In
order to get into trouble with integers-as-reference-types, there would
have to be some quality of the integer itself that was mutable, so that
you could get into trouble by changing that mutable quality in one
place and having it change everywhere.

Anyway, the point was that I like value types. They're powerful when
used in the correct contexts, but a terrible pain when used in the
wrong contexts. Most complaints I've seen in this discussion group
about what a bad idea value types are arise from people using them for
the wrong reasons.

Nov 17 '05 #99
apm
But I can't help wondering if ex vb6 developers now working in C# would
be more productive going back to vb.net for this exact same reason. I
know I am.


What about bugs. Isn't VB.NET different from VB? I know when I went from
Visual C/C++ to C# I had problems because I expected code that looked the
same would behave the same in the two languages.

Similarly, I had few problems with memory leaks with Visual C/C++ but
terrible problems with C++.NET, that is, until I learned how to use it.

Nov 17 '05 #100

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

24
3008
by: dotnetforfood | last post by:
Joel Spolsky's new article "How Microsoft Lost the API War" at http://www.joelonsoftware.com/articles/APIWar.html describes how .NET has failed, how classic VB6 and ASP continue to be preferred by...
32
2201
by: Fresh Air Rider | last post by:
Hi I understand that ASP.net 2.0 (Whidbey) is going to reduce coding by 70%. Surely this is going to de-skill or dumb down the developer's task and open up the task of web development to less...
0
7356
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7427
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7085
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5671
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5069
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3227
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1577
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
785
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
449
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.