![]() Software : Programming : Languages : Procedural Programming - Free and Open Source Educational SoftwarelĬomparison between FreeBSD, Linux and Unix This thread will focus on identifying some of these, and imparting some idea of what they are, what they are good for, and how they stack up against other choices. Duh, what did you expect? But that does not mean that it lacks its own attractions, one being that many development tools, languages, and scripting capabilities exist for it, and most of them are free. The BASIC that most people remember - at its peak - was actually more complicated than an equivalent subset of Python.A big complaint about Linux is that it isn't Windows. The original BASIC was very simple (but also non-extensible). As a result, when language evolved, it also did so in a haphazard way, as with LINE re-purposed for other reasons. MID$ is a function (except when it's not, as above) - but it can take either 2 or 3 arguments, which is not something that you can declare yourself. This goes even for the standard functions - e.g. Thus, most features were implemented as intrinsics, with magic syntax and/or semantics, which varies drastically from feature to feature. The reason for all this is that BASIC was never designed as a language in which the standard library could mostly be written, or even described, in that language. ![]() Then there's stuff like DEFINT and GOSUB and ON STRIG and. Or, for example, MID$ is a function, except when it's not: In BASIC, tons of core features are implemented as statements, with rather weird syntax that got even more weird over time.Ĭan you remember what it does? (no, it doesn't draw a line it would, if not for "FB"). Like, at least in Python, len() is a regular function. There are bazillions of GOTOs, and it's a real drain on your mental processing to keep them all straight.īASIC is far worse than that. The complaint that BASIC leads to spaghetti code is real. I've had the recent fun of transcribing programs from a bunch of different early BASIC languages. The end result is a mess of jumps where the programmer is "emulating" real blocks with GOTOs. The IFs often don't have the concept of an ELSE, and often the only thing you can do from an IF is a GOTO. In Python where blocks are indented statements, or Pascal where you can make a block of statements with a BEGIN/END.īut many microcomputer BASICs don't have that at all. For example, in C you can replace any statement with a list of statements enclosed in. Us modern programmers are so used to block oriented languages that we assume every language just had them. However, the microcomputer BASICs had big usability problems. The current trend where there's a seemingly bazillion steps before you can write a trivial utility is unfortunate. I love the idea of a language that has the absolute fewest number of decisions between "I need a little program" and being able to share the program with a friend. There are enough variants of BASIC that there's a really nifty handbook with the differences at. (This example is from the BASIC embedded in the Tektronix 4050 terminal). This not-really-a-function, though, simply has no justification whatsoever. Nowadays "weird" syntax has some solid foundational reason why it's useful or important. You can't just PRINT the result directly, because then how would REP know what the string to change is? It's kind of like a function, only with a weird implied variable that only works in an assignment. So the REP function looks at the statement it's part of, finds the variable that is being assigned to, and uses that as the starting string (!). The result is ABC123DEF - at position 4 (strings start at 1), replace 0 characters with "123". Mind-blowing BASIC example from the 1970's: New versions of BASIC are surprisingly common (heck, I even have one that's gotten some super-nice comments).
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |