3 ms·
My concern with attempting to learn BASIC is that at least the big ones aren't garbage collected (freebasic, qb64). In the first place (not growing up using BA
by eatonphil 4y ago
My concern with attempting to learn BASIC is that at least the big ones aren't garbage collected (freebasic, qb64).
In the first place (not growing up using BASIC) I don't understand how BASIC got so big as a programming language for beginners (even kids) without a GC.
Or maybe my searches just haven't turned up the right implementation or something.
I have the same issue with (Free)Pascal but I'm less surprised there because it's not like (apparently, since like I said this wasn't me) everyone as a kid learned to game program with Pascal the same way they did with BASIC.
- behringer 4y agoWhy would garbage collection be an issue? All the best BASIC variants either do have GC, or they have manual methods of dealing with garbage, which as the programmer you can always automate.
- eatonphil 4y agoI don't consider manual memory management great for beginning programmers and I don't even like doing it when I'm not a beginner programmer.
- jmmv 4y agoBut why do you think the lack of GC is a showstopper for using the language for learning purposes? Or am I misunderstanding your comment?
- pjmlp 4y agoBecause it actually had a lightweight GC for strings and arrays. 8 bit home micros lacked more complex data structures. And when they migrated to 16 bits, and grew structures, usually you couldn't do indirection with pointers/references, only have a single level of array of structures. For anything more complex you had to use indexes. Pointers were only use for low level coding, changing specific memory locations. Then by the time of VB and Real Basic, proper GC was already widespread among modern BASIC dialects.
- mrlemke 4y agoAs long as you're not messing with memory directly (i.e. dynamic allocation), the OS will clean up after your program exits.
- eatonphil 4y agoYes dynamic allocation is exactly what I'm concerned about. Deserializing text for example.