|
-
Apr 21st, 2023, 11:02 AM
#11
Re: TwinBasic
 Originally Posted by fafalone
So then the behavior of VB.NET is different? Const x = 100 in VB6 type inference rules would make that an Integer (VB6 Integer, 16bit signed). And you know what I meant by ambiguous, that it's not readily apparent and you have to dig into a complex rule set, *just like with VB6 Variant typing or consts*, which have resulted in untold hours running down hard to trace bugs, *because of the ambiguity*, and how unneccessarily easy it makes it for people, especially the beginners and people just trying to make quick tools for their actual work, BASIC is popular with.
I think we view what's ambiguous in entirely different ways. As far as I'm concerned the rules in both VB6 and VB.Net are unambiguous. What I see as ambiguous is more like undefined behavior.
For example C/C++ is notorious for this. Reading outside the bounds of an array in C in undefined. It could crash your application, format your hard drive or do nothing at all. There is no defined behavior for this operation therefore it is ambiguous. A famous example would be the fast inverse square root function in the Quake source code. It's a C function that relies on a bunch of undefined behaviors. It worked at the time, but there is no telling how a modern C compiler would execute that code.
BASIC on the other hand was designed with very clearly defined behaviors. You read outside the bounds of an array in BASIC, it crashes with a specific error. There is no ambiguity there. When you do something like Dim x in VB6, the behavior is defined. In the absence of something like DefInt A-Z that would be a Variant. That is not ambiguous to me.
I think where we truly differ is that I believe the programmer should be held fully responsible for learning the language he is using, where as you seem to believe it is acceptable if he does not. Now don't me wrong. I don't know every single tiny thing about all the rules of VB.Net but when I make errors because I didn't understand a specific behavior, I blame myself, not Microsoft because chances are whatever I misused had clearly defined behavior that was documented.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|