3 ms·
BASIC was my first programming language. Back in 90s I made tons on graphics game in it. It is also very close to assembly and can be made really fast. As a pr
by srivastm 6y ago
BASIC was my first programming language. Back in 90s I made tons on graphics game in it.
It is also very close to assembly and can be made really fast.
As a programming language, I agree it is not a good choice anymore.
I was learning antlr4 and wanted to take it all they way to a working programming language.
BASIC is an easy language to implement and I am familiar with it. Hence the choice.
For my second language implementation, I would probably pick a better language.
My goal is to make it feature complete: add sound support, more functions, array processing, may be add a few modern features like references, and then call it done.
Then I want to focus on improving the IR and runtime machine.
- adamredwoods 6y agoBASIC is great. Neat project! I'm just not a fan of line numbers.
- srivastm 6y agoLine numbers are optional in PuffinBASIC now, introduced labels, e.g. https://github.com/mayuropensource/PuffinBASIC/blob/master/samples/puffingame/flypuffinfly.bas https://github.com/mayuropensource/PuffinBASIC/blob/master/s...
- srivastm 6y agoAfter writing the PuffinBASIC interpreter and a game, here are my initial comments on the BASIC language: 1. Drop line numbers and use Labels 2. Needs multi-line IF-THEN 3. Needs switch 4. Needs named subroutines with local scope, much like functions 5. Needs references (not pointers) 6. Drop variable suffix