Better HN
topnewbestaskshowjobs
Log inSign up

tankorsmash

3 karma · joined Jan 11, 2013 (13y ago) · 11 submissions

www.tankorsmash.com
Submissions

comment 1y ago · link · parent

I'm not sure what the other commenter's point is. If you're checking if the error is nil, or pattern matching on the result of a call, it feels like exactly the same.

In your CrabLang example, you don't have warnings on (I assume they exist) for completion or whatever. There's still the Err case that should at least throw a warning for not being caught.

comment 2y ago · link · parent

I didn't get anything close to that from your original message. I thought you meant "I write functional JS, but am wondering why a language like clojure or OCaml isn't more popular"

comment 2y ago · link · parent

https://combinatorylogic.com/table.html it's hard to read, but there's a ton.

comment 3y ago · link · parent

To me, this doesn't seem like it has much to do with Unison at all beyond being a new FPL, could you elaborate a bit?

comment 4y ago · link · parent

Which part of Haskell is impure?

comment 4y ago · link · parent

Not quite turtle, but Elm (a pure FP) has something prettier, a full 3d renderer https://package.elm-lang.org/packages/ianmackenzie/elm-3d-sc... Demo: https://ianmackenzie.github.io/elm-3d-scene/examples/1.0.0/m...

comment 4y ago · link · parent

> Instead of two ints, now your function takes two maybe-ints and crashes at runtime if they're not there.

The idea in Haskell (and many more, I'm sure), is that if you take a maybe-int, you can't get the int without unpacking it (or using a function that only operates on the int if its there), so then when you pass the unpacked int around, you are 100% sure it's there at all times. No worrying about a JS-style undefined, or some other function altering the value to become null again. It's a guarantee, which is a huge part of why all this FP stuff is so great.

comment 4y ago · link · parent

Is that gatekeeping? It reads to me like they're saying it's not enough to just use a few functions to it FP. Their point seems to be that it's more than just using some functions, which seems reasonable.

comment 4y ago · link · parent

> It's not "if you're used to procedural programming" - FP is simply hard for people to reason about.

It's relatively straightforward once you understand the patterns and idioms, just like procedural programming. `age |> add10 |> substract9` is about as readable as `add10(substract9(age)`, but we're just so used to the latter.

comment 4y ago · link · parent

Are you thinking about prejudice instead?

comment 13y ago · link · parent

I'm pretty sure anyone would not be too upset if that suddenly started happening.