473,842 Members | 1,882 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Beating a dead Horse: Which Language

Hi,

I know that I'm an extreme newb by asking this overly beaten question,
but I am leaning toward C#, becuase the perception is that it is better
to learn than VB.Net. I guess it makes you cooler.:-)

Anyhow, I am a novice programmer, and I will remain one as well...I have
no plans to make programming my life ambition, but I think that it would
be fun to make my databases do some cool tricks and maybe write a
simplistic client to access the database over the LAN, and by internet
as well. My programing will be centered around Data manipulation, i.e.
collecting, sorting, and reporting on this data to myself.....

I want to know which language you find most compelling to accomplish my
mission. It may be that it doesn't have anything at all to do with the
language, from my understanding they are close to equal, but everyone I
come in contact with prefer C# over VB.net
Please, NO FLAMES; just logic
Thank you in advance!
Nov 21 '05
114 3736
On Thu, 30 Jun 2005 07:30:24 +0100, Jon Skeet [C# MVP]
<sk***@pobox.co m> wrote:
Cor Ligthert <no************ @planet.nl> wrote:
"Massimo"
> I'm not talking about aesthetics here, but about docing; when you've a
> procedure with *so much* code and flow control inside, probably it's time
> to split it into more smaller ones.
>

Did you try VBNet. I agree completly with you when it are C derived
languages.

As I said, try it, and than tell your expirience after that. Now your answer
looks for me like somebody who tells that he/she never played footbal (there
was something else before), however talks about if he/she is an expert in
it.


What about VB makes it "okay" in your view to have such deeply nested
functionalit y that would be abhorrent in C#? If it's that you have "End
If" "End For" etc then there's absolutely nothing to stop you from
commenting your C# in the same way:

for (...)
{
if (...)
{
...
} // If
} // For

Personally I don't like it or feel any need for it, but there's nothing
stopping you from doing it if you feel it adds readability.

I think he's talking about VB.NET's automatic formatting (indentation
of code blocks, etc.). And I agree with him - it's something that
VB.NET does better than C#. I still prefer to program in C#, but I
wish it would do the formatting more comprehensively like VB.NET does.
As a C++ programmer from way back (and a C programmer from even
further back), I understand and even sympathize somewhat with C's (and
C++'s and C#'s ) general philosophy of allowing you to format your
code any way you want. I used to think it was Tyranny if an
environment auto-indented code and so forth. And if it doesn't do it
WELL, then it IS very annoying. But the fact is, that formatting
(whether the opening { comes on the same line as the function
declaration or on the next line - aligned with the closing } - on the
same column as the first char of the declaration or indented, etc.) is
trivial and totally unimportant. That someone made that decision
(VB.NET) and enforces the indentations and so forth just frees you
from having to worry about it. Your (and more importantly, other
people's) code is ALWAYS left in a neat and orderly readable state and
all the programmers' code adheres to the standards. That's a good
thing.

I think it's good to let go of the insistance on formatting as we like
it and assimilate. They way VB.NET does it is not objectionable, and
it makes for readable and maintainable code.

I just wish they'd do it in C# too.
Nov 21 '05 #51
It sounds like you want to get something done. Or do you want to be cool?

Either language will accomplish your goal, but for my money, go the VB.Net
route. It actually is the cooler of the two languages because it permits you
to get on with what you want to accomplish without having to overcome some of
the geek "difficulti es" entailed with allegedly "the programmers" language
"c#". In short, VB.Net will have your back for what you have suggested,
which is getting a job done, not being Mr. Programmer.

Oh, if you really want to get the lowdown, read just a couple of
introductory chapters of almost any book on VB.Net to see that we VB.Net guys
no longer play second fiddle to the C# crowd. As a progammer surrounded by
nothing but C# adherents, I've yet to see them do something I can't do, but
in fact have done some things which they cannot without great effort. The
whole approach such that you, wanting to do something useful not necessarily
cool which ultimately rules the day, could do so in the language of your
choice.

Ultimately it's your choice, but for someone directly stipulating they don't
want to become a geek, don't choose the alleged de facto geek's language.
Choose a tool and get on with your business, VB.Net. Remember the language
is the tool, not the result.
"cf***********@ yahoo.com" wrote:
Hi,

I know that I'm an extreme newb by asking this overly beaten question,
but I am leaning toward C#, becuase the perception is that it is better
to learn than VB.Net. I guess it makes you cooler.:-)

Anyhow, I am a novice programmer, and I will remain one as well...I have
no plans to make programming my life ambition, but I think that it would
be fun to make my databases do some cool tricks and maybe write a
simplistic client to access the database over the LAN, and by internet
as well. My programing will be centered around Data manipulation, i.e.
collecting, sorting, and reporting on this data to myself.....

I want to know which language you find most compelling to accomplish my
mission. It may be that it doesn't have anything at all to do with the
language, from my understanding they are close to equal, but everyone I
come in contact with prefer C# over VB.net


Please, NO FLAMES; just logic
Thank you in advance!

Nov 21 '05 #52
Wilbur Slice <pa@papapapa.co m> wrote:
I think it's good to let go of the insistance on formatting as we like
it and assimilate. They way VB.NET does it is not objectionable, and
it makes for readable and maintainable code.

I just wish they'd do it in C# too.


But Visual Studio already does.

For instance, suppose I type in:

for (int i=0; i < 5; i++)
{
DoSomething();

When I hit the close brace, it reformats it to:

for (int i=0; i < 5; i++)
{
DoSomething();
}

automatically.

What does VB.NET do in addition to that?

--
Jon Skeet - <sk***@pobox.co m>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 21 '05 #53
Jon,

What does VB.NET do in addition to that?

At least VB.Net set the close brace automatic and ident and alligns it
direct in the right place and therefore makes it easy when I am busy.

Before you misunderstand me, I find the braces nicer when I look at a
program.

However when I have to read it I prefer the way from VBNet.

(It is just from my expirience with both, not an accademical idea, braces
are not only used in C# you know. I have forever found the way from VB awful
however changed my mind.)

Cor
Nov 21 '05 #54
Cor Ligthert <no************ @planet.nl> wrote:
What does VB.NET do in addition to that?
At least VB.Net set the close brace automatic and ident and alligns it
direct in the right place and therefore makes it easy when I am busy.
But Visual C# does exactly that too, as I said in my previous post. It
basically formats the whole block that the brace ends.
Before you misunderstand me, I find the braces nicer when I look at a
program.

However when I have to read it I prefer the way from VBNet.

(It is just from my expirience with both, not an accademical idea, braces
are not only used in C# you know. I have forever found the way from VB awful
however changed my mind.)


I find that when methods are appropriately short, it should be obvious
what braces are lining up with anyway.

--
Jon Skeet - <sk***@pobox.co m>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 21 '05 #55
"Jon Skeet [C# MVP]" <sk***@pobox.co m> schrieb:
I think it's good to let go of the insistance on formatting as we like
it and assimilate. They way VB.NET does it is not objectionable, and
it makes for readable and maintainable code.

I just wish they'd do it in C# too.


But Visual Studio already does.

For instance, suppose I type in:

for (int i=0; i < 5; i++)
{
DoSomething();

When I hit the close brace, it reformats it to:

for (int i=0; i < 5; i++)
{
DoSomething();
}

automatically.

What does VB.NET do in addition to that?

VB will insert the 'Next' automatically when pressing return:

\\\
For i As Integer = 0 To 4<Press return>
///

=>

\\\
For i As Integer = 0 To 4
|
Next
///

"|" indicates the caret position after pressing the return key.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Nov 21 '05 #56
Herfried K. Wagner [MVP] <hi************ ***@gmx.at> wrote:
What does VB.NET do in addition to that?


VB will insert the 'Next' automatically when pressing return:

\\\
For i As Integer = 0 To 4<Press return>
///

=>

\\\
For i As Integer = 0 To 4
|
Next
///

"|" indicates the caret position after pressing the return key.


Given that it's only one extra character to type in C# ("}") I don't
see that as a particularly compelling advantage, to be honest. In fact,
Eclipse has an option to do that kind of thing when I'm writing Java,
and I usually turn it off - I find it breaks the flow if I'm typing in
code, as I type all of it, only to find that the IDE has already filled
some of it in...

--
Jon Skeet - <sk***@pobox.co m>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 21 '05 #57
On Thu, 30 Jun 2005 17:50:27 +0100, Jon Skeet [C# MVP]
<sk***@pobox.co m> wrote:
Wilbur Slice <pa@papapapa.co m> wrote:
I think it's good to let go of the insistance on formatting as we like
it and assimilate. They way VB.NET does it is not objectionable, and
it makes for readable and maintainable code.

I just wish they'd do it in C# too.


But Visual Studio already does.

For instance, suppose I type in:

for (int i=0; i < 5; i++)
{
DoSomething( );

When I hit the close brace, it reformats it to:

for (int i=0; i < 5; i++)
{
DoSomething();
}

automaticall y.

What does VB.NET do in addition to that?

In C# it does sometimes create the correct indentation for you, but
it's easy to type things in in such a way that it doesn't indent
properly, and it's easy to override the indentation scheme. If you go
back to some code that's already in the program and un-indent it, it
will stay that way.

In VB, it is pretty strict about enforcing the formatting, and it
won't even let you change it - if you try, it just pops it back to the
way it thinks it should be. And the way it thinks it should be is not
objectionable (to me, anyway - it's pretty much the way I would format
things anyway) and so it basically always puts your code into standard
formatting no matter what.

Just try it and see.
But I still prefer C# as a language...

Nov 21 '05 #58
> What about VB makes it "okay" in your view to have such deeply nested
functionality that would be abhorrent in C#? If it's that you have "End
If" "End For" etc then there's absolutely nothing to stop you from
commenting your C# in the same way: Ah, but there's nothing stopping you from commenting your C# code
incorrectly either. So, to use your example, you could have this...
for (...)
{
if (...)
{
...
} // For
} // If
Obviously, because the "end tag" is a comment, this misleading information
is not going to be caught by the compiler. The advantage of the "End If"
and "Next" key words in VB is that these end tags are checked on-the-fly by
the IDE. So, you can't run the code without the matching beginning and
ending tags.

Of course this comes down to personal preference. You mention that there's
nothing stopping you from using comments to denote what kind of block the
right brace is terminating. In my opinion, this good commenting practice
shouldn't be optional. It should be part of the language itself (as in VB),
not left up to the individual programmer. That's why I prefer the VB style
over the C# style. In my book more information is always better than less
information, especially when we're talking only a few additional characters
that are inserted by the IDE most of the time anyway.

Regards,

- Mitchell S. Honnert


Personally I don't like it or feel any need for it, but there's nothing
stopping you from doing it if you feel it adds readability.

Nov 21 '05 #59
Wilbur Slice <pa@papapapa.co m> wrote:
In C# it does sometimes create the correct indentation for you, but
it's easy to type things in in such a way that it doesn't indent
properly, and it's easy to override the indentation scheme. If you go
back to some code that's already in the program and un-indent it, it
will stay that way.
Yes, thankfully. Sometimes (for whatever reason) I don't want to use
the normal formatting.

If you *accidentally* unindent though, just taking out a closing brace
and reinserting it will reformat the block though.
In VB, it is pretty strict about enforcing the formatting, and it
won't even let you change it - if you try, it just pops it back to the
way it thinks it should be. And the way it thinks it should be is not
objectionable (to me, anyway - it's pretty much the way I would format
things anyway) and so it basically always puts your code into standard
formatting no matter what.

Just try it and see.


Hmm... I'd rather not use an editor which absolutely refuses to let me
reformat when I want to! Fortunately, it looks like you can turn that
off.

--
Jon Skeet - <sk***@pobox.co m>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 21 '05 #60

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

Similar topics

106
5258
by: cfmortgagepro | last post by:
Hi, I know that I'm an extreme newb by asking this overly beaten question, but I am leaning toward C#, becuase the perception is that it is better to learn than VB.Net. I guess it makes you cooler.:-) Anyhow, I am a novice programmer, and I will remain one as well...I have no plans to make programming my life ambition, but I think that it would be fun to make my databases do some cool tricks and maybe write a simplistic client to...
0
10940
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10670
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10308
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9451
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7854
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7030
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5882
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4499
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 we have to send another system
3
3141
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.