Hacker News new | past | comments | ask | show | jobs | submit login

This idea comes up occasionally; the idea that classic-style BASIC is great because that’s what a certain generation of us used to learn programming for the first time in the 80’s. Well, consider me a dissenting voice. To quote myself:

> I, myself, originally taught myself to code when I was young, using BASIC on machines with BASIC in ROM, and have typed in listings from magazines and bought expensive BASIC reference manuals, read them in detail and used the language to create many utility programs and games. And even I wouldn’t wish BASIC on anyone when modern languages with features like (gasp) functions are readily available.

(https://news.ycombinator.com/item?id=10842908#10855345)

> I believe that my development and education as a programmer was severely hampered by BASIC’s lack of functions, and I would not wish it on anyone else.

(https://news.ycombinator.com/item?id=10842908#10855467)




BASIC is great because it's basically structurally like simple assembly language but with deceptively approachable syntax.

Also, classic 8-bit era BASIC has functions, they are just limited to a single expression, and limited by BASICs limited array of built in functions and operators that don't require using statements (which I guess makes them the spiritual precursor of Python’s lambdas.)


> classic 8-bit era BASIC has functions

If you mean “functions” in a strict mathematical sense, sure, I remember those. I remember thinking they were useless and wondering what anyone would use them for – I never used them myself. The way to do any sensible subroutine things (in the BASICs I had access to) was to use GOSUB to line numbers, which was a method inherently too cumbersome to do anything complex with, which is why I was stalled when my programs reached a certain level of complexity. I was then mostly halted in my education and development as a programmer for many years, because the language did not make program composition easy. It was not until I had the opportunity to learn other languages with did have proper functions and other methods of program composition that I could break through the barrier, so to speak.

> BASIC is great because it's basically structurally like simple assembly language

And why would that be a good thing? Classic assembly language is basically living on borrowed time, since the memory and CPU model they assume and expose are long gone, and only emulated in microcode on today’s hardware.

Modern hardware platforms are multi-threaded multi-core systems with multiple levels of cache for memory, nothing of which is exposed to classic assembly language. Also, disks are no longer nearly as slow, nor is RAM always volatile. Not to mention that even memory mappings and protection rings, as old they are, weren’t always there in classic hardware, and, when present, were mostly hidden from the programmer, since the programmers of the time were used to systems without them.

Just like classic assembly in a way created C (commonly called a “portable assembler” for its closeness to the old machine model), I’d like to first see an “assembly language” for the modern architecture – something low-level which exposes all the multi-core, cache level, and protection ring complexity as inherent parts of the language. Then, if I dare dream, I’d like to see many high-level languages built directly on top of that low-level one – almost certainly a Lisp, but also maybe an Erlang. All other languages (except maybe Prolog) would probably be too hard (or too like an emulator) to map sensibly to the inherent multi-core model of modern hardware; you might need an entirely new language paradigm. And, sure, also a pony¹, why not.

1. http://www.gocomics.com/calvinandhobbes/1987/01/13


> The way to do any sensible subroutine things (in the BASICs I had access to) was to use GOSUB to line numbers,

True.

> which was a method inherently too cumbersome to do anything complex with,

It's really not. (Unless by “complex” you mean specifically “recursive (even indirectly), but not tail recursive”, in which case I'd have trouble disagreeing.)




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: