3 ms·
An example of convergent evolution - Apple was primarily a Pascal shop back in the early 80s, when they were developing the Lisa. But since bog-standard Pascal
by kabdib 10y ago
An example of convergent evolution -
Apple was primarily a Pascal shop back in the early 80s, when they were developing the Lisa. But since bog-standard Pascal is useless for systems programming, Apple extended it with things they needed: Pointer arithmetic (not auto-scaling by base type, so you were constantly multiplying by sizeof), oh yeah, sizeof, and a bunch of other stuff I've forgotten. Pascal's miserable I/O system was left on the floor. NEW was largely replaced by a heap manager that worked for small systems. And so on.
So what Apple wound up with was "C, with nested procedures". The two languages were nearly identical in semantics. I could spend a day hacking on something, and if you asked me in the evening which language I'd been using I would have had to think about it.
The types of bugs that people wrote didn't seem to vary depending on the language they chose.
My informal survey is that other companies extended their versions of Pascal, making similar choices. These companies (Apollo? a few others) have sunk without a trace.
Languages that look a lot like C are what you get from systems level people doing near-bare-metal programming. You're not going to fix the language, you need to convince the people doing the work that you have something better. And for the most part, something better doesn't exist.
You can write low-level systems in higher-level languages; Microsoft's Midori was an OS from the metal-up in C#, with a lot of interesting deep thinking about abstractions and security. SmallTalk / SELF / FORTH are interesting until you need to scale. LISP Machines didn't take the world by storm in the 80s, and we didn't get very interesting fallout from all the LISP-based OS work that was being done. ADA . . . I know one guy who loves ADA, but he can't tell me what he works on.
Successful languages seem to be the result of commercially successful systems, not the other way around.
- microcolonel 10y agoThis is exactly what I think of when I read this kind of unilateral negativity about C. I love writing programs in C. I don't need to learn any new semantics ever. Even the integer types, as parent was complaining about, have been largely cleaned up(I use (u)int(32,64)_t and (s)size_t and everything just works. The problem space is well understood, the tools are widely-deployed and reliable, the performance is excellent. I just don't see how people can be so negative about something which has been so immensely useful without getting in the way.
- blub 10y agoOp probably meant that C integer types are a mess because they underflow, overflow or result in undefined behaviour at the smallest mistake. :)
- stcredzero 10y agoLanguages that look a lot like C are what you get from systems level people doing near-bare-metal programming. On CISC computers back in the day, K&R C statements supposedly resulted in an average of 2.7 machine language commands. You're not going to fix the language, you need to convince the people doing the work that you have something better. And for the most part, something better doesn't exist. You mean, something better enough that it justifies the short term cost of moving to a different language/environment.