News for hackers. Stuff that matters.
Re:Ask HN: Best talks of 2018? by StreamBright on Wednesday December 26, 2018 @09:33AM (#18762300)
My problem is that I don't know when to expect nil from a call because in Java null is part of every type and you can happily receive a null from anything, the compiler won't give you a warning. In OCaml I know what to expect because Some x | None is super simple to reason about. I can never receive a null a nil or other things that somehow satisfy the type requirements. Clojure is great with untyped programming everything is an Object after all but I still would like to see a reasonable thing like Erlang's {:ok,x} | {:error, error} or OCaml's Some x | None. It is not an accident that many languages that like reliability implemented it like that.
Re:Ask HN: Best talks of 2018? by nadagast on Friday December 28, 2018 @01:50AM (#18775235)
Yes, the default of a lot of languages, (Java, C, etc) where nil is implicitly a member of every other type is a bad default. But that's a separate question.