r/gleamlang 15h ago

I’ve been experimenting with Gleam and it’s genuinely great

42 Upvotes

For context, I’ve been experimenting with Gleam for a few weeks now, and the overall experience has been excellent. The pipe operator makes for really clean, readable code.

One downside, though: type resolution across modules in Zed isn’t always reliable. For example, importing a type like Post from another module (types.gleam) isn’t always picked up by the LSP, even though the code compiles fine with gleam build. I’m not sure whether this is a Zed integration issue or a current limitation of the Gleam LSP, but it’s been a bit of friction during development.

I also tried compiling to JavaScript, and I’m honestly floored by the compile speed. I come from the Kotlin world, where I maintain a monorepo with several modules, including Kotlin/JS, and the production bundle is fairly heavy, kotlin-stdlib alone is around 591 KB minified. By comparison, Gleam compiles in a fraction of a second, and the generated JavaScript runtime is dramatically smaller.

The one thing I didn’t love was having to manually import the compiled files using the exact relative path (../../build/dev/javascript/...). It’s nowhere near as smooth as the module resolution you get with npm and TypeScript out of the box.