Hacker News new | ask | show | jobs
by msla 995 days ago
It seems a puzzle language is one where you haven't fully grasped some conceptual foundation of the language.

For example:

> In Haskell and Erlang, the puzzle is how to manage with single assignment and without being able to reach up and out of the current environment.

You can say the same thing about Python: "Stupid language. I just want a block of RAM and a pointer. Pointer? Parlez vous memory access? Wo ist das Void-Pointeren? Where's that blasted phrasebook... " [1] Python has abstraction over direct memory access, Haskell has referential transparency and a type system that's both stronger and less confining than most type systems that get called 'strict' in the procedural world. Neither allow you to reach out of their environments, at least by default, and it makes both of them simpler and more regular.

[1] Non-English languages intentionally a bit misused. That's the point.

Obviously, the solution is to learn how the language wants to do things, and speak it like a native. This isn't about purity, really, just learning how to use tools as they're intended to be used.

1 comments

> You can say the same thing about Python: "Stupid language. ..

I think you are misunderstanding the point of the article. The writer doesn't mean to say that his puzzle languages are bad, just that they take more thought up front.

I don't think that is bad, I think it can be a benefit. E.g. in Haskell you spend a bit more time upfront to get the types right and making sure everything is pure. The purpose of that is to have a program that won't run into any issues at runtime. With a language like Python you have something ready to fun faster, but at runtime you can expect some errors, so you will have to spend your time at that point.

My point is that you don't spend as much time up front if you have fully internalized the way the language wants you to think. It took me a while to reach some kind of plateau in Haskell, and now I can simply compose working code at the REPL and build programs iteratively like how I can in Python and Lisp where, previously, I had to think hard about monads and types to get anything done.

It's hard to see the riddle some people would find in Python because we're all experienced programmers and imperative languages like Python were what we all started out on. For us, the riddle coming into them was learning how to program at all, so we didn't see the concepts we hadn't mastered as arbitrary stumbling blocks getting in the way of this new language being normal.