6 ms·
I learned a bunch of these when trying to make an f-string-like library for Lua [1], but `f"{...}" and the walrus ones caught me off-guard. Glad this is nowher
by Ezhik 1y ago
I learned a bunch of these when trying to make an f-string-like library for Lua [1], but `f"{...}" and the walrus ones caught me off-guard.
Glad this is nowhere near Wat [2], though.
[1]: https://ezhik.jp/f-string.lua/ https://ezhik.jp/f-string.lua/
[2]: https://www.destroyallsoftware.com/talks/wat https://www.destroyallsoftware.com/talks/wat
- variadix 1y agoThat library looks awesome
- Timwi 1y agoThere are many mistakes in the Wat talk from destroyallsoftware. The biggest one is that he types `{}+[]` and claims that he's adding an object and a list. It's actually an empty scope followed by a unary + applied to a list. You can convince yourself of that by noting that `({}+[])` gives different output. A smaller mistake that I find nonetheless amusing is that he uses Array(16) hoping to get 16 string separators. Oops, off by one error :)
- Ezhik 1y agoArguably that first one is just substituting one Wat for another.