basic in the new msx

Pagina 5/12
1 | 2 | 3 | 4 | | 6 | 7 | 8 | 9 | 10

Van Tanni

Hero (556)

afbeelding van Tanni

07-07-2005, 17:04

but WHY do you want basic to stay 'oldfashioned' even if MANY other basic-variants have such things as block-if, select, functions etc. etc. ? It's not blasphemy to update basic orso..

Do you mean me or do you mean [D-Tail] to answer this question? I just answered to [D-Tail]'s post!

Wolf_, your question is very philosophical and worth to open a separate threat to discuss it. Following the discussion here, one could get the impression that we talk about different things. Do we talk about already existing MSX computers and possible modifications or improvements on the first 32 KB of ROM, or do we talk about the OCM, or do we talk about what possibly comes after the OCM, maybe MSX3 or something different, but somehow related to MSX (that means it comes from the MSX Association, has 69 bit data- and 93 bit adress bus, is based on a Z8000000000 processor implemented in an FPGA)?

IF we talk about existing MSX computers and improvements on the existing BASIC, than forget about OOP and (almost) all the other things mentioned. There's no place in the BASIC ROM to add that features, I think. (But maybe place for little improvements such as BASIC hotkeys like on the ZX81 or ZX Spectrum or VZ200, if we would modify the code and making another ROM to replace the original one. The modification mentioned wouldn't even violate compatibility!)

So WHY do I want basic to stay 'oldfashioned' even if MANY other basic-variants have such things as block-if, select, functions etc. etc. ?

First of all, I talk about 'BASIC', not about 'basic'. The acronym BASIC stands for Beginners All Purpose Symbolic Instruction Code, while 'basic' means something different, as was already mentioned.

As the name implies, BASIC is something for beginners. BASIC was invented in a time with other computational constraints than today and with less experience in software engineering than today. That's not BASIC's fault, therefore I still accept BASIC for that what it is. (Maybe we should call this kind of BASIC implementations ''classical BASIC'' to distinguish them from modern BASIC's.) So do you like to stay beginner forever?

It has turned out that BASIC's way of designing software is not the way we should proceed for many reasons. So, we could ask ourselves, why not totally discard BASIC and exclusivly using 'better' languages more appropriate to modern computers and software design methodologies? To my mind thats why one must experience the problems of one language to appreciate the benefits of another!

Modern BASICs have features which violate the basic BASIC concepts. This BASICs are still named BASIC, but looking like other languages. Yes, you can add lots of features of other languages you consider as good or desirable, but some of this features doesn't work together well, see the horrific VB.NeT syntax in terms of OO mentioned by SKiLLa. And for compatibility reasons, you can't drop obsolete features. So the language gets more and more complex so you can't survey it. You'll get inconsistencies in syntax and semantics and it is difficult to learn, especially for thouse who didn't had the chance to start learning coding when the whole developement started. For them, these modern BASICs must look ridiculous in many ways, especially if you heavily intermix 'old-fashioned' and modern features.

Its not blasphemy to update, yes, but it must be done wisely. And you must recognice when it doesn't make sense!

Besides the nostalgy, new programmers to come also must know about the historical developement. It must be possible to experience the homecomputer feeling, even if there are more powerful computers today. Even in the future, it must be possible to experience real homecomputers and its features. Unfortunatly, severeal of this features were discarded in modern computers, even if they are interesting and would ease up the use of modern computers. It must still be possible to experience that computers can be something different as the standard system used nowadays!

Van Bart

Paragon (1422)

afbeelding van Bart

07-07-2005, 17:15

Backwards compatibility is only affected if an already existing feature of MSX-BASIC would be redefined in a possible MSX3-BASIC.

That's also making it non backward compatible. But MSX2 BASIC is not backwards compatible with MSX1 BASIC. It's MSX1 BASIC which is forward compatibale with MSX2 BASIC. A whole lot of a difference...

Van Tanni

Hero (556)

afbeelding van Tanni

07-07-2005, 17:40

Backwards compatibility is only affected if an already existing feature of MSX-BASIC would be redefined in a possible MSX3-BASIC.

That's also making it non backward compatible. But MSX2 BASIC is not backwards compatible with MSX1 BASIC. It's MSX1 BASIC which is forward compatibale with MSX2 BASIC. A whole lot of a difference...

Maybe you think of backwards compatibility in a different way. MSX2-BASIC is backwards compatible to MSX1-BASIC because of an MSX1-BASIC programm will also run on a MSX2-machine. Thats only possible if additional syntax and semantics doesn't change already existing syntay and semantics. A program using MSX2 specific statements naturally will not run on MSX1! According to your understanding of backwards compatibility, there'll be no evolution if you try to be backwards compatible.

Van SKiLLa

Expert (114)

afbeelding van SKiLLa

07-07-2005, 17:45


That's also making it non backward compatible. But MSX2 BASIC is not backwards compatible with MSX1 BASIC. It's MSX1 BASIC which is forward compatibale with MSX2 BASIC. A whole lot of a difference...

Huh, when a MSX1 BASIC program functions correctly in MSX2 BASIC without modifications, we call this MSX2 BASIC backwards-compatible with MSX1 BASIC, not ? Something as 'forward compatibility' is not in my dictionary. I could be wrong, but I doubt it ...

As Tanni marked out (among others), the discussion is a little 'wide', talking about the OCM BASIC, a new (modified) MSX-BASIC and even a complete new MSX-Language (Yes, vote for JS ;-). Perhaps a good subject for the next poll ( * HINT * ) ?

For the OCM I'd just like to see a 'normal' MSX-BASIC, with KUN-BASIC included. For a modified MSX-BASIC one might just add 'call [extra commands] as a plugin. And instead of a heavily modified MSX-BASIC syntax (which is not compatible with the existing MSX-BASICs) I prefer something like JS-based (or VBScript-based) as a new MSX language. Not a complete new, yet to be defined BASIC syntax. It would be easier for everybody to learn the JS/VBS notation (just with build in 'MSX objects' like VDP and MUSIC, like ASP does to VBS). This way the syntax is a 100% JS/VBS complaint, but has full MSX-functionality ...

Now please feel free to shoot at my 2 cents ... Smile

Van Tanni

Hero (556)

afbeelding van Tanni

07-07-2005, 17:47

Perhaps because an 'old-fashioned' BASIC is just what it is: a great stepping stone into the world of programming. If you introduce more structure/OO stuff in it, surely an advanced coder will be able to do much nicer things with it, but a complete beginner (especially youngster) will not be very keen on learning the language anymore.

...

If MSX-BASIC would have looked like this when I was a 5 year old, I would never have coded a single line of MSX-BASIC on it. Beginners want the 10 PRINT "HEY, THIS WORKS! ": GOTO 10 stuff Wink So please, no declaring variables, block-if, procedures, functions or o.O in the default BASIC. It is very likely to scare people off. A more structural, powerful BASIC might be a great second step in the world of coding tho Wink

You are right, snout, except for you were most likely not able to read that code when you were 5 years old!

Van Bart

Paragon (1422)

afbeelding van Bart

07-07-2005, 18:23

Something as 'forward compatibility' is not in my dictionary. I could be wrong, but I doubt it ...

Huray for WikiPedia Smile http://en.wikipedia.org/wiki/Forward_compatibility

I didn't say it right though. MSX2 is backwards compatible with MSX1, but MSX1 is not forward compatible with MSX2. Which would be the same with a new MSX3 BASIC. MSX3 would be backwards compatible with MSX2, but MSX2 will not be forward compatible with MSX3. That was what I meant to say. Sorry for the mixup, but you've got a new word in your dictionary at least :)

Van Tanni

Hero (556)

afbeelding van Tanni

07-07-2005, 18:30

Tanni: the 'LIST a-c' things aren't feasible in BASIC, because all variable names, types and values are determined at run-time. A workaround for this is declaring them using DEF INT/SNG/DBL/STR, but I don't think this is what we want. I still think MSX-BASIC is quite cool, but sucks syntactically (MSX-BASIC 5.0 anyone? ;-))))))

[D-Tail]: Why shouldn't it be feasable? Typically, this type of command would be used in direct mode. After the startup, if you are in program mode, i.e. you are typing in the BASIC lines, LIST a-z wouldn't show variables and the associated values, even if you would declare them by DEF INT/SNG/DBL/STR. But after the first run, BASIC has enlisted the variables and associated the values of all variables found in the lines executed. And now, you'll get the list of all variables the interpreter encountered during the run. Of course, there may be some variables not in the list because they weren't encountered because the interpreter didn't execute the lines they're in. In the LIST command I propose, if you don't specify a type, the command should list every variable of that name regardless of its type. There's also no need to introduce a new token for it, because the already existing LIST command only allowes line numbers as arguments. So the interpreter can determin what it should do by determine whether the argument is a line number or a letter. (Does anybody know if Sinclair-BASIC allowes variables to be arguments of the LIST command? As far as I have read long times ago, in Sinclair-BASIC, you could do GOTO X, where X was a variable containing a line number.)

I think this command would be very useful to understand programs written by others or to debug porgrams regardless if they are made by others or by yourself. And you would get a list of used variable names and their current content very quickly, avoiding naming conflicts. Yes, MSX-BASIC is still quite cool for smaller private applications.

By the way, wouldn't it be good to automatically add the user name and the date and time of a quoted text?

Van ARTRAG

Enlighted (6923)

afbeelding van ARTRAG

07-07-2005, 20:52

Actually what about a BASIC compiler?
I mean a true compiler that produce ASM code that can be
manipulates assembled by an assembler and executed
independently from the the basic, in msx dos for example...

XBASIC is nice but for true applications...

Van SKiLLa

Expert (114)

afbeelding van SKiLLa

07-07-2005, 22:35

@Bart: cool, so forward-compatibility does exist ! I should have googled for it ... Wink
Since I already learned something today; could anyone also tell me howto do the pinguin-smiley ?

BTW: a BASIC-Compiler which produces ASM-source would be cool, but I would prefer the BASIC (or better: JS/VBS) with inline ASM instead. Compiler-generated ASM is not always easy to understand, and it would probably still be quite sub-optimal compared human-typed ASM. And human-modified ASM code would not be reflected in the BASIC source.

Van Bart

Paragon (1422)

afbeelding van Bart

08-07-2005, 00:23

You mean Smile ? Just : and )

Pagina 5/12
1 | 2 | 3 | 4 | | 6 | 7 | 8 | 9 | 10