5 ms·
BASIC. It's still a fun language for toys and prototypes, and Dijkstra is a moron for saying it ruins programmers, but on the other hand, it is kind of rubbish.
by qwertyuiop924 11y ago
BASIC. It's still a fun language for toys and prototypes, and Dijkstra is a moron for saying it ruins programmers, but on the other hand, it is kind of rubbish.
- Jtsummers 11y agoThat letter by Dijkstra was certainly hyperbolic. But he was also referring to a version of BASIC where unstructured programming was the norm. To say that that ruins programmers is not entirely wrong. Consider the developer who has to unlearn years of habit involving the use of numerous global variables and temporary variables that produce unreasonable code. What does t1324ab123 mean?!? Seriously. What does it mean? This is in code written by people with bad habits. The hyperbolic element is that they're "brain damaged". But the truth is, they have to be rehabilitated and convinced that what they're doing is unmaintainable and unreasonable. Programmer background does matter. Modern BASIC is not at all what he was railing against in that letter. EDIT: EWD498 - https://www.cs.utexas.edu/users/EWD/ewd04xx/EWD498.PDF https://www.cs.utexas.edu/users/EWD/ewd04xx/EWD498.PDF
- Turing_Machine 11y agoThat's certainly one point of view. Another point of view is that expecting beginners to adhere to a rigid set of rules and design principles is both unrealistic and makes the learning process dull. Pretty much an entire generation of programmers cut their teeth on the BASICs in the early microcomputers, and we have all kinds of whizzy stuff now. Where's the modern equivalent? I would argue that it's HTML/Javascript/CSS ecosystem. It has many features in common with the early BASICs. It's on every machine (well, every machine with a brower, which is pretty close to every machine) It's there as soon as you start up. It lets you tinker around with graphics and sound out of the box. It doesn't require any tedious and confusing (to a beginner) compile/link process. It's danged-near as messy as old school BASIC, too, yet it's also where most of the innovation seems to be occurring. Personally, I do not think this is a coincidence.
- Jtsummers 11y agoThat same generation of programmers also moved us out of the GOTO hell that they existed in with more reasonable structured languages. There's a reason, and it's not just coincidence, that old school Fortran and BASIC and assembler written in an unstructured manner is difficult to maintain and reason about, while software written in more structured language is easier to maintain and reason about. This is what Dijkstra was commenting about. It's related to his "Go to statement considered harmful" (1968) paper and his text (with Hoare and Dahl) Structured Programming (1972). EDIT: I was looking for something like this. https://en.wikipedia.org/wiki/Dartmouth_BASIC https://en.wikipedia.org/wiki/Dartmouth_BASIC Version 6 saw the introduction of separately compilable procedures with parameters. In 1976, Steve Garland added structured programming features to create Dartmouth SBASIC, a precompiler which produced version 6 output (and which formed the basis of ANSI BASIC). Structured programming was introduced into at least this version of BASIC after Dijkstra's statement about BASIC causing brain damage.
- Turing_Machine 11y agoYou are missing my point, I think. There is no reason why "language suitable for building gigantic, uber-complex, mission-critical systems" and "language suitable for fooling around with as a beginner" should be the same, and many reasons why they shouldn't.
- Jtsummers 11y agoI never said they should. But languages like the historic BASIC created a set of habits and ideas that had to be unlearned to build reliable, scalable software. Your example of JavaScript as a modern BASIC is a different language. It provides all the structured programming ideas that Dijkstra wanted. Where it fails (failed?) is in its concurrency mechanism favoring a version of callback hell and its weak type system. Those are much easier to overcome than first learning to code by interleaving code blocks and using gotos rather than subroutines, while loops and the like.
- dragonbonheur 11y agoThat "rubbish" created an industry worth hundreds of millions at the height of Visual BASIC and thousands of programmers were exposed to BASIC as their first language from the late sixties onwards, including Bill Gates. BASIC evolved over the years to become a powerful language to build solid systems with. And unlike Python it could do proper division from the start without loading libraries.
- qwertyuiop924 11y agoBut VB ISN'T BASIC. As in, at all. It may have started out that way, but VB has as much of a relation to BASIC as modern C++ has to C: There's a legacy connection, and C is supported by the compiler, but the actual code doesn't look or feel like C in any way. The BASIC we talk about here is Unstructured and Structured BASIC, which bears very little resemblance to VB, and has many failings. As for python, I believe you can do division just by using the / operator, just like most other languages. Unless I misunderstood what you meant by "proper" division. Even so, what's so bad about having to load a library to do division? It's not great, sure, but it's not awful, and it's a good deal better than the many sins of BASIC.