Re: Overflowing a Long

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Michael C wrote:
"Mike Williams" <mike@xxxxxxxxxxxxxxxxx> wrote in message news:uUhjtq3XHHA.2436@xxxxxxxxxxxxxxxxxxxxxxx
I'm not "under exaggerating", Michael. I have written BASIC programs for almost thirty years and many of even my very earliest BASIC programs would run with no problems whatsoever if I pasted them into a VB6 Button Click event, for example.

They mustn't do much though. They obviously can't draw to the screen.

That's more to do with the DOS/Windows API than the languages themselves, and you know it.

But not a single one of them would run in dotnet. Not even the simplest of them. Not even most of the "one liners".

That is likely true but restricting vb.net to vb6 syntax would have held it back a *huge* amount.

It didn't need to be restricted, only to be backwards compatible without breaking changes. Adding new things is a good thing (when done with careful thought). Breaking old behaviour is always bad. For example, they could have added .NET's file I/O *in addition to* keeping the VB6 way. The only two things they needed to change were: deterministic finalization and running in the .NET framework. Even then, the option to compile to native should be there (like it is for C++).

Can you imagine our nicely oop language being infected with gosubs, gotos etc?

If you don't like a part of the language, and can avoid it, then don't use it - simple as that. C++ still has goto, despite being looked down upon by most.

A massive number of changes!

but it's still the same basic syntax
No it isn't, Michael. It is massively different.

It's basically the same.

The *tokens* of VB6 and VB.NET are very similar. However the *grammars* of VB6 and VB.NET are only fairly similar (Dim, As, Function; Sub; Type; [With]; Public; Private; For...Next; Exit <Block>; [Property]; . as scope operator; function calls ...) but not the "basically the same" (File I/O; Error handling; GoSub/GoTo; Mixed Visibility Properties ... ). Therefore the languages cannot be considered the same, not only because the grammars are significantly different (Had VB.NET merely _extended_ VB6's grammar then they might be considered that might be ) but also because many items' *semantics* have been removed or changed (Return; Variant; Dimensioning arrays; On Error; String; Long; Integer; Dim x, y as Type).

Syntax = Tokens + Grammar. (http://en.wikipedia.org/wiki/Syntax_of_programming_languages , summarised)

Language = (At least) Syntax + Semantics. (My definition)

It's the same with java and C++. They use almost identical tokens, similar grammars (but with significant differences) and different semantics (e.g. How many java operations are "implementation defined"). Do you consider java and C++ to be "basically the same"?

It's not something I've bothered to actually quantify. It's more of a "gut feeling" thing, although you could certainly quantify it if you wished to do so. As I said earlier, I've been programming for nearly thirty years (machine code, Assembler, Fortran and BASIC) and when I picked up my first copy of Visual Basic (which I didn't bother doing until VB5 came out, because I was busy with other languages at the time) I was almost immediately comfortable with it. It was BASIC, but with some extra bells and whistles. There was of course a slight learning curve because of the event driven nature of VB5 (which was new to me) but nevertheless I felt at home almost straight away and I could convert even the oldest of my previous BASIC programs to VB5 very quickly and with very few problems. Dotnet is not like that.

There is a slight learning curve but it's really not that bad. It's definately less of learning curve to going from a dos language to an event driven language (if you think back, learning events wasn't that easy, it could get complicated).

It's not the learning curve that's the issue: any programmer worth their salt will be able to pick up new languages fairly quickly (they will need to, as the set of languages in use changes). The issue is taking old code, that behaved one way, and knowing that it will behave the same way in what is supposed to be the next version of a language.

Not like that at all. As far as I am concerned, dotnet is not BASIC at all. The only relationship dotnet has to the old BASIC is that the Micro$oft sales team have persuaded the Micro$oft programmers to "graft onto it" a large number of "Basic sounding constructs" in an attempt to persuade people that it is something which it isn't! Their underhand ploy hasn't worked for me, although I'm sure lots of people will be taken in by it, at least until they have parted with their money.

You can design a form just like vb6 and all the syntax is still basic syntax. It's both visual and basic :-)

Wrong, you've confused "syntax" with merely "tokens" again. But at least you're right about the visual bit - no-one denies the right of Fred to be called _Visual_ Fred, it's just the Basic bit that's at odds with reality. <g>

Stewart
.



Relevant Pages

  • Re: VB.NET & VB6
    ... The language syntax really is fairly trivial. ... I agree with not moving a large VB6 code base in one giant ... > Learning curve is not an issue. ... There is no reason to invest time and money moving the applications to .Net when there is zero payback. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Overflowing a Long
    ... That is likely true but restricting vb.net to vb6 syntax would have held it ... Can you imagine our nicely oop language being infected ... previous BASIC programs to VB5 very quickly and with very few problems. ... There is a slight learning curve but it's really not that bad. ...
    (microsoft.public.vb.general.discussion)
  • Re: How big of a difference between VB 6 and .net
    ... .Net is a very different language and there is a considerable ... > learning curve. ... Think going directly from VB3 to VB6 with lots of class ... conversion was optional There are still tons of people writing VB3 ...
    (microsoft.public.vb.general.discussion)
  • Re: Tool to mark code which has been executed
    ... a external party where all coders are C# coders ... They are all VB6 developers and management ... why move them to another language. ... VB6 program while we're doing the VB.NET upgrade. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: MS, Enough is Enough!
    ... translation of VB6 would result in a messy difficult to maintain .NET ... It would have been possible to keep the existing language, but extend it to make it fully OO, and add the ability to access the .NET framework. ... There is no reason why MS could not have made VB7, which would have compiled existing VB6 code but was also fully OO. ... That doesn't stop my .NET apps being slower than my C++/VB6 native apps, or mean that my existing VB6 code-base can move forward to take advantage of the .NET framework. ...
    (microsoft.public.vb.general.discussion)