I would counter that this isn't really about writing code, more about what a compiler should do with crap code when a programmer writes that, when a programming language allows that to be done.
But a huge part of the world doesn't. They pick a Basic variant they like the look of, or maybe the only one which exists for their platform or can be afforded, lash themselves to it, ignore all other variants, and have an entirely happy and productive life.
There's no need. Those using the basic they've chosen are happy with what they are using, don't care if anyone else is using that or isn't.
I do believe you are right.You're trying to solve a problem which basic users don't believe they have.
BBC BASIC isn't a "modern" BASIC in that sense; it would impossible to be whilst maintaining compatibility with its namesake of 38 years ago. It's not surprising that it retains some of the original features such as a small memory footprint by default (the BBC Micro could have as little as 5Kbytes free memory in some graphics modes!). Nevertheless that default memory is sufficient for the vast majority of programs and occasionally having to increase it does not impair its functionality.
Oh, just you wait … some BASIC dialects had effectively two GOTO instructions: the regular one and EXIT nnn which, well, I'll let the Digital Group* MAXI BASIC Level 1.1 manual explain:Heater wrote: ↑Tue May 14, 2019 4:07 pm…
With this discussion I discover that GOTO is a lot more harmful than I ever imagined. Seems that supporting GOTO in a language is totally confusing to the guys defining/building the language. With the result that various implementations of the same language end up treating GOTO differently.
Code: Select all
EXIT The EXIT statement is identical to a GOTO except that it has the effect of terminating any active FOR loops and reclaiming the associated internal stack memory. It should be used for branching out of a FOR loop. 100 IF A (J) = 100 EXIT 320
I can appreciate that.I enjoy working with the old pros that are tried of building frameworks and just want to glue together what they need and then move on to the next task on their list.
I don't have to 'sell' ScriptBasic. It does that itself after people try it.It's a hard sell now a days.
Absolutely. You're really not the best person to critique BASIC with the limited exposure you have had.Heater wrote: Are sure that "ScriptBasic" does not say "Retro"?
Speaking as an old pro who spends his time glueing stuff together here are some things I am tackling at the moment, for fun and/or profit, and the languages I use to tackle them:"Too good to be true" syndrome.
Just noticed your post edit there.You're really not the best person to critique BASIC with the limited exposure you have had.
Resource limits are an essential part of any program execution environment necessary for robustness, reliability and security--modern or not.RichardRussell wrote: ↑Tue May 14, 2019 5:56 pmBBC BASIC isn't a "modern" BASIC in that sense; it would impossible to be whilst maintaining compatibility with its namesake of 38 years ago. It's not surprising that it retains some of the original features such as a small memory footprint by default (the BBC Micro could have as little as 5Kbytes free memory in some graphics modes!).
What features does ScriptBasic have for accessing memory directly? In converting C code to BBC BASIC, which I do quite frequently because so many algorithms and examples are published in C, I often find myself converting C's & (address-of) operator directly into BBC BASIC's ^, and C's * (indirection) operator directly into BBC BASIC's ! or ?.
Code: Select all
v = 0 address_of_v = ^v !address_of_v = 123456 PRINT v
Indeed. A potential issue with languages that dynamically allocate and free memory is that it can be hard to be certain that they won't fail after an extended period of running, for example as a result of memory becoming excessively fragmented. If the memory is allocated 'up front' and only freed on termination, as it is in BBC BASIC, there should be no possibility of such a 'long-delayed' failure.
On Windows the DLLC extension module has a dynamic FFI, access / creation of C structures. Wide / bstr and quad variable support, low level COM, virtual DLLs and more. On Linux just PEEK/POKE, varptr.Richard wrote: What features does ScriptBasic have for accessing memory directly?
In the latest TIOBE index, for May 2019, the top BASICs are Visual Basic .NET at number 5 (having risen since last time) with just over 5% rating and Visual Basic at number 16 with 1.3%. Sadly BBC BASIC (the only other BASIC they list) has fallen out of the top 50, so I don't have an actual rating, but 3rd most popular BASIC (according to them) ain't bad!