Hacker News new | ask | show | jobs
by KirinDave 3480 days ago
> Python gets it right. Ruby gets it right. Julia gets it right. Most lisps get it right etc.

What. I ship Clojure all day, got CL in my past. Was a full time ruby dev. I got a list of ugh and eck for all of them. I can name 30 more issues with Python. Truth be told, I think Python is a rancid language and I think people who love it are basically eating barf pancakes every day and thanking people who look down on then for it. GVR doesn't do that bs "I don't get lambdas" garbage in the company of other language designers, that's for sure.

What you consider visual noise is arbitrary. It's like what color paper you prefer to note take on. Every language has issues. Python is riddled with syntactic noise and artifacts that you've normalized. Ruby's syntax is better, but still full of quirks and surprises. Don't even get me started on Scala.

"I am used to this" and "this is objectively better unless you are some academic" is a classic example of industry insecurity. You shouldn't avoid Haskell because you are irritated with a bit of syntax, you should avoid it because you can't ship or maintain the kind of deliverables you need to write.

> Most of us programmers are shallow and lazy and we should be proud of this and build tools that cater to our "virtues".

Pride is one of the ugliest sins of our industry, I agree. Too many developers refuse to accept that there might be progress in the industry outside of what they experienced in their first 2 years in the industry.

2 comments

While his vitriol was extremely hyperbolic, I get his point somewhat on obtuse syntax.

Take this example of Haskell from their docs:

  thenP :: P a -> (a -> P b) -> P b
  m `thenP` k = \s ->
     case m s of 
       Ok a -> k a s
	 Failed e -> Failed e
It doesn't matter how good you are in [insert almost any common language], you'll really struggle to understand that code.

It's my same objection to things like Coffeescript, if you think you are so much more productive not typing semantic tokens like ()s or {}s, then you need to lay off the coffee and get some sleep as you're clearly dillusional.

> It doesn't matter how good you are in [insert almost any common language], you'll really struggle to understand that code.

To the extent that true, it's because of the weird historic moment between the mid 1990s and now where essentially every industrially popular general purpose language is from the C branch of the Algol family.

It's not really the whitespace (which is clear in semantics), and other than the lambda slash and the infix ticks, the whole thing is pretty clear from a Lisp background. (Well, I'm familiar enough with Haskell now that I'm not filtering it through some other language, but the similarity to Lisp is what helped it start to click early on for me, even though it's an ML descendant and not a Lisp descendant.)

We're actually starting to see more gains for non-Algol descended general purpose languages, so maybe the syntax shyness of the last generation or so of programmers will soon be a thing of the past, because knowing multiple languages won't so invariably be knowing multiple members of the same syntax family.

If you removed the middle paragraph, I'd wholeheartedly agree everything you said. Unfortunately I don't feel my prior Lisp experience helped me as much when I was starting off in Haskell as it apparently did you.
> It doesn't matter how good you are in [insert almost any common language], you'll really struggle to understand that code.

Perhaps I've been using Haskell too long but that code looks very clear to me.

And it looks slightly clearer when laid out correctly

  thenP :: P a -> (a -> P b) -> P b
  m `thenP` k = \s ->
     case m s of 
       Ok a     -> k a s
       Failed e -> Failed e
But this is not a fair test. There needs to be a control. Implement the same functionality in Python and then we'll talk about which language is clearer.
I copy-pasted directly from the doc page that layout, guess I should've proofread it to make sure alignment was right. Thanks!

As to the comment re: control / python, I'm sorry but it's so obvious to me the syntax would be more legible to most developers (since "most" use Algol descendent syntax languages) even if done somewhat poorly, I don't feel like taking the time. I welcome you to prove me wrong, I'll gladly stand corrected if so!

What?! How would you even write that combinator in Python? You can't possibly convince me it would be clearer!
Yes, it looks clear to me too. But you and I are Haskell programmers. That said, outside maybe OCaml, no other language I've written code in (which is about 26ish at this point) prepared me mentally to be able to grok the syntax.
We weren't talking about any of this.
> You shouldn't avoid Haskell because you are irritated with a bit of syntax, you should avoid it because you can't ship or maintain the kind of deliverables you need to write.

I can ship and maintain deliverables I need to write in Haskell more effectively than other languages.

Sure, and that's great. Not everyone had a domain where Haskell is appropriate or access to a group of people who can help with maintenence in Haskell.

And some domains are ill-suited to Haskell due to constraints on the VM.

Is any of this a surprise?

> you should avoid it because you can't ship or maintain the kind of deliverables you need to write.

To clarify, you were saying "you should avoid Haskell in the case you can't ship or maintain the kind of deliverables you need to write" and not "you should avoid Haskell because Haskell won't let you write or maintain the kind of deliverables you need to write"...

Right?

Your first interpretation was the one I understood.
Yeah, Luckily I caught myself interpreting it uncharitably and decided to clarify.