Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Hey, thanks! I wasn't aware of that.

That said, I suppose a Haskell designer and me have rather different expectations from a type system. I want great TypeScript/Java level tooling, catching stupid type-style bugs, and easier to understand code. Going for a fully covered, sound, type system sounds like quite a challenge indeed and I can imagine why it didn't work out.

I disagree that "The type system can't guarantee the types of what gets sent between processes" implies "a type system would be useless". Most of my code is not busy sending and receiving messages. It's just, well, regular boring single-threaded code that manipulates data, performs some side effects maybe, etc. I'd be perfectly happy with a type system that just makes me specify, at compile time, what message types a process is expecting to receive. Somebody sends something else? My problem, runtime error. That way, each process can be decently typechecked individually, the process type can just be "pid", and you can skip the entire "how do we type the actor model" problem. I'm sure I'm wrong here in some subtly detailed way, but I'm convinced that Elixir would fit a TypeScript-like type system like a glove if you just forget about typed messaging.

Does this guarantee "if it compiles, it works"? Nop. Does it allow for readable code, extremely powerful tooling and catching stupid errors? Sure thing.



Out of curiosity, have you tried Dialyzer? It sounds like almost exactly the level of static typing you're looking for (i.e. a TypeScript-like system). It's been a part of the Erlang distribution for a long time.


They have, they mentioned it in their initial post. Although I don't think they've tried the lasted RC that VASTLY improves the Developer Experience


Oh!! Good to know, thanks :-) Half our codebase is still typespec'ed from when we were optimistic believers, so we'll give it another go for sure :-)


Yes, it's borderline unusable. Typing is supposed to save time, not cost it.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: