4 ms·
Gleam looks great. The only thing about Elixir I'm unhappy with is the typing. Gleam seems to bring good things from the Rust type system to the Beam (especial
by lawn 3y ago
Gleam looks great.
The only thing about Elixir I'm unhappy with is the typing. Gleam seems to bring good things from the Rust type system to the Beam (especially sum types, pattern matching and avoiding nil).
My question though, I've been really happy with Phoenix for web development. How well would it work to develop a Phoenix web app with Gleam? Would it even work with LiveView?
Could I use Gleam on the frontend too (it also compiles to JavaScript)? How would that work with LiveView?
- inawarminister 3y agoI'm a bit late, but I just found out that there's a version 3 library for Gleam called Lustre, which is an Elm-like framework for frontend. And people seem to be able to make it work with Phoenix (compile to javascript in /assets/ folder directly), LiveView should also work but haven't seen anyone trying it yet. There's also a React wrapper
- report-to-trees 3y agoGleam looks like a new language built to compile down to the BEAM. While you could call elixir or erlang libraries from Gleam code, using Phoenix probably wouldn't be useful. I imagine a new framework would be written for Gleam.
- worthless-trash 3y agoThe elixir macros dont work well from gleam, you can however 'call' it, but you need to wrap all the macro code in elixir functions then call them from there.
- arrowsmith 3y agoFYI: Elixir may be getting static typing in a future version. https://elixir-lang.org/blog/2023/09/20/strong-arrows-gradual-typing/ https://elixir-lang.org/blog/2023/09/20/strong-arrows-gradua...
- inawarminister 3y agoDoes Elixir's Set-theoretic Types support declaring restricted subset of types for modelling purposes as often done by ML programmers? The "Type-Oriented Programming" or "Domain-driven Design"?