zlacker

[return to "I tried Gleam for Advent of Code"]
1. mono44+gg[view] [source] 2025-12-13 19:05:07
>>tymsca+(OP)
I've looked at Gleam before but it didn't seem to have any mechanism for dynamic dispatch like interfaces or type classes. Did it change in the meantime?
◧◩
2. lpil+Ih[view] [source] 2025-12-13 19:18:36
>>mono44+gg
Gleam has first class functions, so it has dynamic dispatch.

Both of type classes and interfaces desugar to high order functions, so anything you write with them can be written with first class functions, though with a less concise API.

[go to top]