Hacker News new | ask | show | jobs
by koolmoe 6712 days ago
A production language should favor reading the code over writing it, and a toy language should do the opposite. Note that I don't mean that the language is a toy, but that it's used to make toys.

Yes, Lisp is used to make toy programs like the software running on the $100 million 1998 Deep Space 1 probe.

Their final top-level function is:

  (define (sqrt x)
  (fixed-point-of-transform (lambda (y) (- (square y) x))
                          newton-transform
                          1.0)
Good luck figuring that out. I'm sure it was fun to decompose the problem into those functions, but in production two years from now some programmer is going to be in a world of pain when he has to add a feature to that program.

That's only hard to read if you don't know Lisp. And the function names are quite descriptive if you understand numerical methods. If the hypothetical developer doesn't understand fixed points and Newton's method, he shouldn't be modifying that sqrt function anyway.

There might be a good point about obfuscation via abstraction somewhere in SICP, but this example isn't it. Even if it were, it has less to do with the language itself and more to do with the developer that designed the abstraction.

I suspect Mr. Kestleloot is simply ill-informed.

2 comments

The guy has the phrases "secret startup" and "java enterprise development" in the same sentence in the About Me section of his blog... can't imagine a real hacker saying either of those things, let alone in the same breath and without laughing.

Of course, I wouldn't claim to qualify either, but then again, I understood that sqrt function just fine.

I'm pretty sure his true definition of 'Production Language' is 'Java' and 'Toy Language' is 'Anything Not Java'

He just posts a basic code snippet and then says "good luck figuring that out." Seems like he's just appealing to those who don't know and who don't want to know, but who are happy to have some blogger confirm their prejudices.