News for hackers. Stuff that matters.
Re:Ask HN: What made you change your mind about a programmin... by ridiculous_fish on Sunday March 03, 2019 @11:42PM (#19298828)
Anyone want to swim upstream in the static types -> functional programming -> immutability current?

I'll do it:

1. LLVM's IR. In many ways this is dorky OO: everything has a reference to everything else (an Instruction knows its BasicBlock knows its Function...). It also has many dynamically-enforced constraints, e.g. a basic block must have its phi nodes at its beginning, and terminators at its end. These are NOT enforced via the type system but instead dynamically through verification. I was surprised, but I have come to realize the ergonomic benefits of having everything reachable from everything, allowing transient illegal states, and how type-level enforcement enacts a complexity price.

2. Clojure's threading macros, in particular thread-as. This is basically Haskell's do-notation, but more flexible and without involving the compiler. LISP continues to be relevant and eye-opening - are there any static type systems that have such a construct?

Re:Ask HN: What made you change your mind about a programmin... by wqdqdwqdq on Monday March 04, 2019 @01:56PM (#19304108)
Nope, Haskell's do notation is context based computation passing mechanism that in most cases obey laws, while Clojure's threading macro is a programmer/human convenience. Both have nothing but superficial similarity