4 ms·
I wrote a small DSL for easy compilation to SQL that included some similar features. It included datetime literals, but they were specified as just a string pre
by prpl 4y ago
I wrote a small DSL for easy compilation to SQL that included some similar features. It included datetime literals, but they were specified as just a string prefixed with "d".
d'2020-02-20'
I also tried to make it so that every comparison had both english and symbol representations, a range syntax, and an approximation/match comparison (e.g. "=~", "!~") which could work with both floating point numbers and strings properly.
I found this useful, and wish it was in more languages.
- still_grokking 4y agoComparing floats is not a great idea, though. That's a foot gun.