Skip to content

Comment on Haskell is beautiful in practiceparent

Comments

None of those code examples (except the parsec example) are things that you wouldn't be comfortable with after sitting down for an hour with a haskell book.

Parsec is a special case: it's full of unusual operators, because it is really like a DSL for parsing. It is really quite beautifully designed however.

It just annoys me when people look at the language and their brain shuts down because they see a (:) or a ($).

It's not because they're unaccustomed to the special characters in syntax, quite the contrary, it's because those special characters have associated meaning for them, through Perl and Unix shell.

When I was first learning Lisp I was frustrated by the syntax for characters; #\a means the letter a, or 'a' in C, both are three key strokes, and I didn't understand the unusual convention. Well, it's because Lisp allows named characters, like #\Tab and #\Newline, along with custom unicode characters like #\Arabic_Alif. Aha!

Unix-syntax is almost always single-purpose; that doesn't help reuse, and causes reader-table over population. Lisp, and functional-language style syntax is there for a very good reason, usually your own good.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.