4 ms·
I loved this article. I never knew about Userland Frontier Kernel and enjoyed looking it up. I also enjoyed other bits of history sprinkled in the article espec
by leoh 10y ago
I loved this article. I never knew about Userland Frontier Kernel and enjoyed looking it up. I also enjoyed other bits of history sprinkled in the article especially about Macintosh switching from Pascal to C and about what it was like to use the Ada and Pascal compilers.
The author's central argument is "don't give up on a language that's hard because it might have significant, practical advantages." In particular, he argues that Ada might be superior to C because C suffers from segfaults or other memory-related issues that Ada does not suffer from. Because C was initially easier to write, he went with it.
I think this principle — that it is worth sticking with a language despite difficulty in writing it — is flawed. While Ada was both difficult and resolved memory issues, languages like Python graceful avoid memory issues without being difficult to write.
Naturally, language safety is greater than ensuring memory integrity. Haskell ensures memory integrity and type safety and happens to be a hard language. I think that Haskell is a stepping stone. That in the future, languages will be safer, but also easier to write. That we haven't solved this paradox — that a language can be both safe and easy to use — is merely a matter of time. For now, I'll keep writing Python.
- JohnStrange 10y agoAda is fairly easy to use once you know it. It has a few quirks and many nice features. It just takes a bit more time to learn, because its way more strongly typed than most other languages. IMHO, its main advantage is not safety, though, but readability and long-term maintainability. You can take a 30 year old Ada program and compile it with the latest version of GNAT. Anyway, please don't compare languages like Ada and Python. That's like comparing Forth and Smalltalk or apples with oranges. They have different purposes. Ada compiles to executables that run around as fast as C and C++, and like those languages it's not very suitable for rapid lego-brick type programming. For gluing together existing libraries, languages like Python are awesome but you wouldn't want to write an Operating System in Python.
- icebraining 10y agoYou can compile any Python program to C using Cython, hence Python is as fast as C.
- Kapura 10y agoThat's like saying "you can compile C to x86 ASM, so C is as fast as assembly" Abstraction has costs. They can be reduced, but they don't evaporate.
- icebraining 10y agoMy point is that "fast as C" is meaningless. You can write quite abstract/unoptimized C. And you can write Python code with a few Cython-specific annotations that rival "regular" C code.
- leoh 10y agoI don't know how to reply to this. Comparing languages is what this entire article is all about.
- lmm 10y agoPython won't segfault but it is easy to get runtime failures that wouldn't occur in Ada. It may even suffer from C-like levels of security vulnerabilities - if the internal state of the program is thoroughly corrupt, as is the case for most Python runtime errors, then it would be odd if that state didn't create an exploitable vulnerability. I used to be a big fan of Python, but having used Scala for a few years I wouldn't go back.
- leoh 10y agoI don't think this negates my argument. Go Scala!