Hacker News new | past | comments | ask | show | jobs | submit login

Same. I suffer through it, because the rest is pretty neat.

There is no best way. Fortunately the Elixir core libraries are annotated with typespecs, which gets you like 30% there. But dialyzer sucks, and the typespec syntax itself, as well as its expressiveness, leave a lot to be desired. It's clearly an afterthought.

One day I'm gonna make a TypeScript for Elixir.

Note: There's eg Gleam a statically typed language for BEAM, but it's quite unlike Elixir and it has a much smaller community. https://github.com/gleam-lang/gleam. I doubt using eg Phoenix on Gleam is possible, or if it is, whether it's fun. It looks promising though, especially if you're into Ocaml/Haskell-style "hard" FP.




Hi! I'm the author of Gleam, thanks for your interest.

For how young we are I think we're doing a good job of building a community, there are more familiar faces in IRC and on GitHub every day.

My goal is for Gleam to be easier to use than Elixir, and in many ways we are taking inspiration from Elm which excels here. Hopefully in the future Gleam will meet your needs! :)


Gleam seems like effort in the right place, I'm looking forward to seeing it in the wild!

Since we got you here, can you tell us what's your plan with static type checking for message passing semantics? From what I understand, that's the hard part about producing a static type checker for BEAM systems.

As for things like gen_server, is the idea currently that you simply give type definitions to callbacks, allowing the gen_server to model its state with types?

At first glance, I also don't understand yet how parametric polymorphism works. Is it implemented at language level?


Gleam is pretty young, so I wouldn't expect the community to be huge.

Not sure what you mean by 'Phoenix on Gleam', but you could write core code in Gleam and use it in an Elixir/Phoenix app, no probs

https://dev.to/contact-stack/mixing-gleam-elixir-3fe3


I just mean "how easy would it be to common Elixir libraries from Gleam, especially if they're rather involved like Phoenix".

Like, quite some of the more popular Elixir libraries (eg Phoenix and Ecto) depend quite heavily on macros, which I assume sortof rules out using them from other languages. Like Elixir itself, I think Gleam will only really shine once a community builds its own libraries for non-trivial messy stuff such as DB layers and web frameworks for it.

The interop is be great for simple functional stuff though, like unicode converters, JWT libraries and AWS wrappers.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

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

Search: