Sample Code - VB or C#?

  • Thread starter Chad Z. Hower aka Kudzu
  • Start date
C

Chad Z. Hower aka Kudzu

I need to provide a series of demos for an assembly. There are potentialy
several dozen of them. None of them are very complex, however maintaining two
versions of them will be very maintainance intensive.

Some of the very basic ones I have provided in both C# and VB. However moving
forward, time just does not permit. So I have to choose - C# or VB? For me,
it does not really matter. I am comfortable in either one.

If I choose C#, this will alienate VB users. My feeling is that more C# users
can read VB code easily than VB users can easily read C# code.

However if I choose VB, I might alienate C# users. My feeling here is that C#
users generally can read VB, but hold a general disdain for it and feel
somewhat slighted if they have to read VB and no C# is available.

I would like to equally include both communities with a preference to neither
one.

Comments? Suggestions? Corrections?


--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"


ELKNews - Get your free copy at http://www.atozedsoftware.com
 
C

Cor

Hi Kudzu,

My expirience in this newsgroup is different than you say.

It should be, but it is not.

When I contribute samples in another more general newsgroup for Adonet and I
do it in VB than I recognize that C# users often do not understand that is
almost exactly the same.
(I try to put in those samples as less declaration and casting as posible
and than mostly the only extra difference is the ";" the () and [] )

The same expirience I have here in this newstgroup with VB users about C#
when Herfried supports a link to a C# sample.

I hope this helps you?

Cor
 
C

Chad Z. Hower aka Kudzu

Cor said:
When I contribute samples in another more general newsgroup for Adonet
and I do it in VB than I recognize that C# users often do not understand
that is almost exactly the same.

What kind of reactions do you get from C# users though?
The same expirience I have here in this newstgroup with VB users about
C# when Herfried supports a link to a C# sample.

What kind of reaction do VB developers have when people post C# code here?
I hope this helps you?

Kind of - Im not sure what the reactions of your users were. :)


--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"


ELKNews - Get your free copy at http://www.atozedsoftware.com
 
H

Herfried K. Wagner [MVP]

Chad,

* "Chad Z. Hower aka Kudzu said:
I need to provide a series of demos for an assembly. There are potentialy
several dozen of them. None of them are very complex, however maintaining two
versions of them will be very maintainance intensive.

Some of the very basic ones I have provided in both C# and VB. However moving
forward, time just does not permit. So I have to choose - C# or VB? For me,
it does not really matter. I am comfortable in either one.

If I choose C#, this will alienate VB users. My feeling is that more C# users
can read VB code easily than VB users can easily read C# code.

I don't think so. I often read in C# groups and C#ies more often don't
/want/ to read VB.NET code ("bah, it's BASIC") while VB.NET programmers
more often will read C# code in order to solve a problem.
However if I choose VB, I might alienate C# users. My feeling here is that C#
users generally can read VB, but hold a general disdain for it and feel
somewhat slighted if they have to read VB and no C# is available.

I would like to equally include both communities with a preference to neither
one.

Comments? Suggestions? Corrections?

Look for a coworker who will help you to provide the samples in both
programming languages.

:)
 
C

Cor

Hi Kudzu,

I think the answer is already given by Herfried, I think I had written the
same on this answer.

But feel free to ask you know?

Cor
 
J

Jay B. Harlow [MVP - Outlook]

Chad,
I would not worry about alienating one group over the other personally per
se.
Some of the very basic ones I have provided in both C# and VB. However moving
forward, time just does not permit. So I have to choose - C# or VB? For me,
it does not really matter. I am comfortable in either one.
Why not choose both?

Do the simply ones in both as you said, and then do some advanced ones in C#
& some advanced ones in VB.NET, with a more or less equal representation?

Another alternative, what is the language of the assembly itself? Favor that
language?

Hope this helps
Jay
 
J

Jay B. Harlow [MVP - Outlook]

Herfried,
I don't think so. I often read in C# groups and C#ies more often don't
/want/ to read VB.NET code ("bah, it's BASIC") while VB.NET programmers
more often will read C# code in order to solve a problem.

That's where I will use "Here's a VB.NET sample, if you need help converting
let me know" ;-)

If the sample is not simply enough to be quickly converted.

Then again I am a firm believer in you should be able to READ & both
languages.

Jay
 
C

Chad Z. Hower aka Kudzu

(e-mail address removed) (Herfried K. Wagner [MVP]) wrote in
I don't think so. I often read in C# groups and C#ies more often don't
/want/ to read VB.NET code ("bah, it's BASIC") while VB.NET programmers

Yes, that the problem. C#ites dont want to read VB code. :) Either way I wil
alienate some, but which one will be "offended" less? :)
Look for a coworker who will help you to provide the samples in both
programming languages.

Its a matter of time - we already have 12 people, and enough work schedule to
fill all their time for a LONG time to come. :)


--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"


ELKNews - Get your free copy at http://www.atozedsoftware.com
 
C

Chad Z. Hower aka Kudzu

Jay B. Harlow said:
Do the simply ones in both as you said, and then do some advanced ones
in C# & some advanced ones in VB.NET, with a more or less equal
representation?

Possible, but Id prefer to be consistent. Im leaning towards C#, with some VB
ports where time permits.
Another alternative, what is the language of the assembly itself? Favor
that language?

Delphi. :)

I already have sample code for all of that.


--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"


ELKNews - Get your free copy at http://www.atozedsoftware.com
 
C

Cor

Hi Chad,

I should advice you to think about to write it in the language which is in
your idea the farest from Delphi

This sounds strange, but mostly people start to copy as much as possible
from the old language and bringing than aspects in the samples which are
from the previous language.

You see it still in some of the VB.net samples on MSDN (although it becomes
better and better) those look sometimes as just rewritten C++ samples. A
language has also an own style in describing things and I think that is also
important.

Cor
 
H

Herfried K. Wagner [MVP]

Chad,

* "Chad Z. Hower aka Kudzu said:
Yes, that the problem. C#ites dont want to read VB code. :) Either way I wil
alienate some, but which one will be "offended" less? :)

If you ask this question in a VB.NET group, you'll get the answer that
you should write the samples in VB.NET. In the C# group people will
tell you that they would prefer samples written in C#. It's a very hard
decision.
Its a matter of time - we already have 12 people, and enough work schedule to
fill all their time for a LONG time to come. :)

Mhm...
 
C

Chad Z. Hower aka Kudzu

(e-mail address removed) (Herfried K. Wagner [MVP]) wrote in
If you ask this question in a VB.NET group, you'll get the answer that
you should write the samples in VB.NET. In the C# group people will

Ive asked on both groups, and not as a cross post so I dont start a flame
war.
tell you that they would prefer samples written in C#. It's a very hard
decision.

Yes of course. But I can measure the reactions of each group relating to
disgust of reading the other language. :)



--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"


ELKNews - Get your free copy at http://www.atozedsoftware.com
 
H

Herfried K. Wagner [MVP]

Chad,

* "Chad Z. Hower aka Kudzu said:
Ive asked on both groups, and not as a cross post so I dont start a flame
war.

Very clever...
Yes of course. But I can measure the reactions of each group relating to
disgust of reading the other language. :)

Would be interesting if you let us know about your final decision!
 
H

Herfried K. Wagner [MVP]

* "Chad Z. Hower aka Kudzu said:
Yes of course. Delphi 8. Its actually code that compiles in Delphi.Net as
well as Delphi 5-7, Kylix (Linux), and C++ Builder 5-6.

I wonder that there are any people using Delphi for .NET development...

;-)
 
M

Markus Hahn

Maybe this helps you: from my own experience, I switched from C# to
Visual Basic.NET a couple of weeks ago (a mixture of curiosity and
looking back to the old VB3 days). There were many new things I learned
what this new BASIC dialect can do and also knowing C# I'm not so sure
if someone one familiar with the sharp language can read VB.NET
instantly. Depends on the complexity, I guess - but some things
(modules, with, chr, ctype) could make the understanding harder. If it's
only .NET Framework API calls then I guess you're fine with any
language. On the other hand VB.NET programmers probably will choke on
expressions like "while (null != (test = (obj = new
Foo()).Items[nI++]));" . Tough question indeed...

-markus
 
C

Chad Z. Hower aka Kudzu

(e-mail address removed) (Herfried K. Wagner [MVP]) wrote in [email protected]:
I wonder that there are any people using Delphi for .NET development...

Plenty. Without starting a flamewar - Delphi.net does not require a near
rewrite of your existing code like VB.net and C# users have had to do.


--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"


ELKNews - Get your free copy at http://www.atozedsoftware.com
 
C

Chad Z. Hower aka Kudzu

Markus Hahn said:
language. On the other hand VB.NET programmers probably will choke on
expressions like "while (null != (test = (obj = new
Foo()).Items[nI++]));" . Tough question indeed...

I'll be sure to not include anything cryptic - but there are uses of using.
Like this:

using (FileStream LOutput = new FileStream(@"c:\temp\test.txt",
FileMode.Create))
{
.....
}

Should most VB'ers be able to understand this?


--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"


ELKNews - Get your free copy at http://www.atozedsoftware.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top