Hacker News new | ask | show | jobs
by azeirah 762 days ago
Huh, this is such an unusual design goal in programming languages "just try something and it'll probably work"

Only css is done this way... but not even intentionally

3 comments

That's not the design goal, it's more a "haha but kind a true" thing.

https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node235.html

The grammar for what's accepted by Loop is well specified, but the results also read very clearly. Once you learn a few of them, you start to understand how the rest would be written and can guess, but the design is not that you would guess.

> Huh, this is such an unusual design goal in programming languages "just try something and it'll probably work"

Perl was famously that way. It's great for the initial write but not so good for maintenance.

Very very handy for people just learning (what's often referred to as "baby perl" in an affectionate rather than derogatory way).

Learning to use perl -properly- is a whole other barrel of monkeys though.

(it does have the advantage that it's very easy to spot code written by a confused perl programmer, whereas I've experienced a number of unfortunate events where python code initially looked fine but turn out to be logically utterly confused; this is not a complaint about python, though it does darkly amuse me)

Haskell works like this: if you can manage to make it compile, it'll work the first time. Might leak gigs of space too, but it'll work.