52
you are viewing a single comment's thread
view the rest of the comments
[-] tatterdemalion@programming.dev 5 points 5 months ago* (last edited 5 months ago)

Gleam is cool. I wrote some services with it to see if I wanted to use it for more projects. It seemed like a good option because it would be easy to teach.

Things I like:

  • fast build times (I only tested small apps though, under 2000 LOC)
  • strong static types
  • runs on the BEAM
  • easy to learn
  • pattern matching
  • immutable + structural sharing
  • currying (with parameter holes)

Things I don't like:

  • no re-exports
  • it's possible to have name collisions between packages; authors have a gentleman's agreement to always create a top-level module with the same name as the package
  • some standard library APIs seem missing or immature (it's still pre-1.0)
  • it can be hard to get good performance out of idiomatic code for specific tasks (see immutability)
  • no format strings; best you can do is "Hello, " <> name. It starts to get cumbersome
  • parsing/serialization is all quite manual boilerplate; there's nothing quite like serde
  • no field/argument punning
  • no method syntax; you just have to scan the docs to figure out what functions can be used with a given type
  • you can't define the same variant name twice in the same module; I believe this is a limitation in how the types are translated to Erlang records
  • you can't call functions in pattern matching if guards
  • you can't have dependency cycles between modules in the same package
  • hard to write FFI correctly; you lose all the comfort of types
this post was submitted on 11 Jun 2024
52 points (98.1% liked)

Programming

17314 readers
71 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 2 years ago
MODERATORS