▲ | mvx64 2 days ago | |
Actually yes! I use it when passing a texture into a draw function. I have a TexOrColor enum, and when calling the function you either provide an &Image or a &Color. Before that, if I wanted a colored textureless model, I passed a dummy 1x1 texture to sample from. And of course, Options and pattern matching are easily the best part of the language and very powerful. I am obsessed with things like "let x = if {...}". |