News for hackers. Stuff that matters.
Re:A technical vision for the Haskell ecosystem by smitty1e on Friday November 13, 2026 @02:21PM (#50488427)
> Beginners: the onboarding experience must be our benchmark for usability

OK, so I put this into Gemini: "show me a non-trivial haskell function and type signature with at least five distinct arguments"

And I get:

---

processRecord :: (a -> b) -> Maybe c -> [d] -> (e -> Bool) -> (b, c, [d], e) -> Either String (b, c, [d], e)

processRecord transform mVal items pred (bVal, cVal, dList, eVal)

  | pred eVal = Right (transform (const bVal undefined) mVal, cVal, dList, eVal) -- simplified example logic

  | otherwise = Left "Predicate failed on the fifth argument"
---

My brain just crashes after the "::".

For the beginner, there isn't enough syntax on offer to discern who's doing what to whom here.

Is there a "function signatures for dummys" somewhere?

Re:A technical vision for the Haskell ecosystem by kccqzy on Friday November 13, 2026 @02:27PM (#50488494)
Your brain crashes just because of unfamiliarity with the syntax. Just mentally translate it into C++ or Rust syntax. This familiarity can be gained in frankly a day or two of trying. The example doesn’t even involve anything truly mind blowing for a beginner yet, like the Traversable class, the lens/traversal/prism signatures, or polymorphic recursion.
Re:A technical vision for the Haskell ecosystem by Jtsummers on Friday November 13, 2026 @02:58PM (#50488840)
[delayed]
Re:A technical vision for the Haskell ecosystem by nurumaik on Friday November 13, 2026 @03:05PM (#50488920)
-- Show me a non-trivial function

-- Here you go

-- Oh my god, it's non-trivial

Re:A technical vision for the Haskell ecosystem by lambdas on Friday November 13, 2026 @03:09PM (#50488969)
Huh? How would that be a good criteria - how many languages exist where a non-user can easily grok non trivial functions with at least five distinct arguments?

If someone told me German was easy to learn, I wouldn’t get an LLM to generate me a complex sentence with two clauses and three adjectives and then be like “sure about that?”

`processRecord :: (a -> b) -> Maybe c -> [d] -> (e -> Bool) -> (b, c, [d], e) -> Either String (b, c, [d], e)`

Says: “ give me: 1) a function of a to b, 2) a ‘c’ wrapped in a Maybe, 3) a list of d’s, 4) a function of e to a Bool, 5) a 4 tuple of a, b, list of d’s, and an e

And I will give you either a String or your original tuple back”

It doesn’t really do anything so there’s not much more to explain

Re:A technical vision for the Haskell ecosystem by the_af on Friday November 13, 2026 @04:35PM (#50490142)
If you read the most introductory guide of Haskell, or ask your LLM to explain, you'll find there's nothing mystifying about the syntax you quoted. You're just unfamiliar with it because you didn't do the bare minimum effort.

If I ask my grandma what she thinks of the supposedly easy Python syntax, or C-style curly braces, her brain would similarly crash. Unless she read an intro to Python or C first.

In other words, do not confuse "I'm unfamiliar with this because it doesn't resemble what I know" with "hard to understand".