This is probably a super minor concern compared to everything else out there (and it’s easily worked around), but I feel like it’s worth bringing up.
Basically, if you do open Belt
, the array access syntax sugar (e.g. matrix[i][j]
) ends up breaking, as Belt.Array.get
returns an option('a)
instead of 'a
, and Belt.Array.set
returns a bool
instead of a unit
.
I’ve worked around this by including an ArrayOverlay module (per @thangngoc89’s suggestion) that replaces these with the original stdlib implementations, but this seems kinda weird. Other stdlibs like Core also retain the original Array.get/Array.set
signatures (presumably to support this syntax sugar), so I was wondering if Belt should do the same.