News for hackers. Stuff that matters.
Re:Elixir v1.20 released: now a gradually typed language by williamdclt on Thursday June 04, 2026 @09:13AM (#48398182)
> people used to write server software in compiled languages feel the need for them because any runtime bug means downtime

I keep hearing that but I don't think it's been true in many years? Whether it's Go, Java, C#, Rust... a runtime bug will only fail the request, not the whole server.

FWIW, the main reason I like types isn't for the compile-time guarantees (although they're certainly nice). It's for documenting what are the data types I'm working with rather than having to guess them from the code, it's for knowing that something is a square hole therefore I should put a square piece in.

Re:Elixir v1.20 released: now a gradually typed language by kamma4434 on Thursday June 04, 2026 @12:34PM (#48401063)
That’s my top issue with Clojure: I see what the function does, but is it expecting a list, a string, either, or a map? The function may apply correctly, but what was it supposed to do? Java may be boring, but it’s surprise-free. In Elixir this is less of an issue because of pattern matching and very clear errors showing the actual arguments passes, that are unbeatable for debugging - you look at the log and can “see” the issue.
Re:Elixir v1.20 released: now a gradually typed language by geokon on Friday June 05, 2026 @12:11AM (#48407827)
In Clojure you typically program to interfaces/protocols and not to types

The Clojure docs should be more straightforward about the interfaces that are available and targetted

You can still have a problem of not knowing which is required of an argument, but its usuallt clear contextually

Re:Elixir v1.20 released: now a gradually typed language by kamma4434 on Friday June 05, 2026 @11:28AM (#48413868)
What I mean is that it is harder for me to reason about. In Java you also use collection interfaces, but List<String> is a no brainer.
Re:Elixir v1.20 released: now a gradually typed language by geokon on Saturday June 06, 2026 @05:37AM (#48423128)
yeah, your overall point stands. Sometimes you can get a bit mixed up on "wait, does this take a File object or a string with the filename?". I guess my point was that because you program to interfaces this happens a bit less often than one would expect. If it can take a vector it can usually also take a list