05-25-2004, 10:29 PM
*sigh*
read!!!!
na_th_an wrote that before. read it this time.
really, if you want a faster programming language, learn c or c++ or something. because it's not worth it to make another basic, as there is NO USE FOR IT!!!! all qbasic is any good for is hobby programming, and learning to program and develop programming technique. therefore making a new compiler is just a waste of time.
read!!!!
Quote:That's impossible. To make BASIC as fast as C you have to:
1.- Add pointers. I mean true pointers. In BASIC you can get a pointer to a piece of data, but nothing else.
2.- Take away all the boundary checks. Such stuff can only be performed in execution time and slowens down the program execution a TAD. It is there to make BASIC simpler to use and to debug. In C, if you write outside an array you will crash the computer, most likely.
3.- Take away the string handler. Coding in BASIC is so simple 'cause the strings are taken care of by the runtime (done in the best way, but not always "the faster" way). In C you have to do it yourself.
4.- Take away (or translate) the deprecated stuff allowed for backwards compatibility.
5.- Change the file managing system to a lower level. In C you deal directly with the file descriptor, in QB it happens like with the STRINGS: you get a handler and the runtime does the rest.
6.- Take away the error managing, and all the execution-time checks.
7.- Change the ports and interrupts managing to a lower level. You are talking to QB, not to the machine, for the sake of security and trying to allow as many crashes as possible. That is slow.
8.- Allow the user to do all the memory management. Currently it is done automaticly.
na_th_an wrote that before. read it this time.
really, if you want a faster programming language, learn c or c++ or something. because it's not worth it to make another basic, as there is NO USE FOR IT!!!! all qbasic is any good for is hobby programming, and learning to program and develop programming technique. therefore making a new compiler is just a waste of time.