Timeline for Why do variable names in BASIC need type suffixes?
Current License: CC BY-SA 4.0
19 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Aug 17 at 15:08 | vote | accept | Willis Blackburn | ||
Sep 30, 2021 at 18:17 | comment | added | No'am Newman | From the ATARI book (in chapter 5, the pre-compiler): The variable is considered to be a string if it ends with $; otherwise it is a numeric variable. | |
Sep 30, 2021 at 15:52 | comment | added | DevSolar | @RBarryYoung: What you are referring to is "System Hungarian" and was an abomination that completely ignored what the actually useful "Apps Hungarian" was actually about or good for, and got "largely adopted" because too many people unthinkingly adopt what Microsoft tells them is the current bee's knees. Until even Microsoft realized that System's Hungarian serves absolutely no purpose whatsoever other than obfuscating your source, and discontinued its use. | |
Sep 29, 2021 at 21:42 | answer | added | Tim Lovern | timeline score: -1 | |
Sep 29, 2021 at 9:23 | answer | added | Paul | timeline score: 2 | |
Sep 28, 2021 at 22:52 | comment | added | dave | @RBarryYoung - nice to know I'm not part of that majority :-) | |
Sep 28, 2021 at 16:49 | answer | added | hotpaw2 | timeline score: 5 | |
Sep 28, 2021 at 15:36 | history | edited | user3840170 |
edited tags
|
|
Sep 28, 2021 at 15:19 | answer | added | user4766 | timeline score: 3 | |
Sep 28, 2021 at 15:06 | comment | added | RBarryYoung |
In some ways it was the precursor of type-prefixing of variable names, such as intCounter and strAddress . I.E., despite some ridicule of it, the programming profession actually ended up largely adopting the practice in a more language-agnostic way (at least up until type-identifying tools like Intellesense were widely available).
|
|
Sep 27, 2021 at 22:27 | comment | added | tofro | Well, not all BASICs need to type variables. Sinclair QL's SuperBASIC, for example, can use typeless variables as arguments to functions and procedures - You can write a procedure that sorts integer, string and floating point arrays with the same piece of code. | |
Sep 27, 2021 at 21:11 | answer | added | dave | timeline score: 24 | |
Sep 27, 2021 at 21:07 | history | became hot network question | |||
Sep 27, 2021 at 17:10 | comment | added | Jim Nelson | Adding a link to The Atari BASIC Source Book for others to peruse: archive.org/details/ataribooks-the-atari-basic-source-book It's a lucid and concise explanation of the design & implementation of an 8-bit era BASIC. | |
Sep 27, 2021 at 14:51 | answer | added | Will Hartung | timeline score: 7 | |
Sep 27, 2021 at 14:33 | comment | added | Solomon Slow |
Re, "It knows the right-hand side of the assignment is a string." I don't actually know how Atari BASIC was implemented, but I would not make that assumption. A parser, scanning let x$=... from left to right already knows the type of the variable before it attempts to parse the given value. Having that information sooner, rather than later, might make a difference in the size and complexity of the interpreter. On a platform that might have as little as 8K bytes of RAM, that might be important.
|
|
Sep 27, 2021 at 13:57 | history | edited | Willis Blackburn | CC BY-SA 4.0 |
added 41 characters in body
|
Sep 27, 2021 at 13:26 | answer | added | Raffzahn | timeline score: 39 | |
Sep 27, 2021 at 13:04 | history | asked | Willis Blackburn | CC BY-SA 4.0 |