Beating a dead Horse: Which Language

  • Thread starter Thread starter cfmortgagepro
  • Start date Start date
Herfried,
ACK. However, often programming languages live longer than class
libraries... The stronger a programming language is tied to a certain
framework, the harder it will be to migrate the code to a new framework.
In my opinion is this against all what you have written the last months why
VB classic should be kept alive.

Programming language have the same (however quicker) evolution than natural
languages.

Class librarys have in my opinion to be consistent in there behaviour, even
when it is unwanted behaviour which is not a bug. This to fulfil what you
have written the last months.

Just my 2 eurocents.

Cor
 
Herfried K. Wagner said:
Consider VB's intrinsic functions -- some of these functions exist (with
slight adaptions) since early versions of BASIC and can still be used. I
see these functions as meta-framework which abstracts from the framework
currently used, and thus prefer these functions over corresponding
functionality which is part of the .NET Framework Class Library.

Interesting, although my view is the opposite: I prefer to use the functions
of the .NET Framework instead of the ones of the early Basic, since the code
is very tied to the .NET Framework anyway. Using the functions of the
framework makes it more easy to migrate to, say C#, or even Java (which uses
a different framework), IMHO.

--
Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio .NET, VB6, VB5 and VBA
You can code, design and document much faster.
Free resources for add-in developers:
http://www.mztools.com
 
Cor Ligthert said:
In my opinion is this against all what you have written the last months
why VB classic should be kept alive.

The main problem with the Classic VB/VB.NET issue is that the languages are
not code-compatible although they could have been designed to be. That's
another topic which has been discussed several times in newsgroups. Despite
this incompatibility the VB.NET runtime library provides functionality which
is almost compatible with the corresponding functions of earlier BASIC
dialects, which means that some of the knowledge can be reused and code can
theoretically be reused if there were no breaking changes to the syntax like
the loss of support for arbitrary lower bounds of arrays etc.
 
You wrote that you never tried VBNet. You should try that, you would not
believe your eyes when you see how nice that is arranged by the IDE and
how good readable your programs become by nesting something even 10 or 12
(or more) deep.

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.

Massimo
 
"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.

Cor
 
Massimo said:
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.

The problem are not only blocks inside methods. Imagine an explicit
namespace definition with class definitions, nested classes, properties and
only a single additional 'if' block inside the property's getter. This
leads to six closing brackets. When implementing a complex algorithm it
gets even worse (up to ten nesting levels in total).

\\\
namespace Foo
{
public class Goo
{
public class Bar
{
public string Name
{
get
{
if (...)
{
...
}
}
}
}
}
}
///
 
Andrew said:
I'd go it a step farther and say that programming languages are only
a thin layer on top of programming concepts. Once you get proficient
at the underlying logic of writing code, it becomes merely a matter
of a few days to learn syntax and some good reference books to become
functional in a new language.

There are a few exceptions to this.

For example, languages like Prolog, F#, LISP change some of the fundamental
nature of the way you think about what the code is and does. C++, for
example, encapsulates several different ways to code at once, which makes
reading it challenging at times.

But, certainly, within the confines of a particular paradigm (object
oriented/event driven/etc.) translating from one language to another is
quite simple.

--
Reginald Blue
"I have always wished that my computer would be as easy to use as my
telephone. My wish has come true. I no longer know how to use my
telephone."
- Bjarne Stroustrup (originator of C++) [quoted at the 2003
International Conference on Intelligent User Interfaces]
 
Cor Ligthert said:
"Massimo"
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
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:

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.
 
Jon,
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:

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 agree with you and probably will use in future your sample, which I to be
honest never thought of, however the difference is that it is at the moment
not automaticly done and as well not automaticly alligned direct when you
are busy.

However thanks for the idea

Cor
 
Jon,

Jon Skeet said:
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

It's actually 'Next', not 'End For' :-).
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.

The main problem with these comments (which are mandatory in some companies)
is maintainability. It's hard to keep those comments in sync with the
actual block types. VB.NET will automatically check the end statements.

Just my 2 Euro cents...
 
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:

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.
 
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 "difficulties" 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.
 
Wilbur Slice said:
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,
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
 
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 said:
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.
 
Herfried K. Wagner said:
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...
 
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?


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...
 
Wilbur Slice said:
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.
 
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.


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.


I know what you mean. And I used to feel that way, too. But I got
assimilated. I used VB.NET for a year or so and got used to that
feature - even came to appreciate it. When I switched over to C#, I
found it annoying that I had to waste my attention fretting over
trivial nonsense like formatting.
 
Back
Top