Comment by __jonas
17 hours ago
> If anyone has experience in this language, what is the mindset with gleam? How you guys debug?
There is the echo keyword now, which is comparable to elixir's dbg(), I use that a lot.
Lacking a REPL, what I normally do is make a dev module, like 'dev/playground.gleam' where I'm testing things out (this is something that the gleam compiler supports, /dev is similar to /test) and then run it with 'gleam run -m playground'.
Sometimes I also use the Erlang shell. You can get an Erlang shell with all the gleam modules from your project loaded in with the 'gleam shell' command. You just need to know the Erlang syntax, and how Gleam modules are named when compiled to Erlang (they use an '@' separator, so gleam/json becomes 'gleam@json').
Cool, thanks! I really like Erlang syntax, will try that in the afternoon.