Probably not possible with ligatures/glyph variants but really cool would be grouping of numbers: In groups of three the first digit would be moved to the right and the last one to the left to simulate a narrow space as thousands separator.
It's a shame the C/C++ standards committee(s) didn't just copy Verilog's base-n notation when they added the "0b" prefix. It's nice to be able to write large constants with optional underscores every four or eight digits, e.g. 32'hffff_0867_5309_beef, or 12'b1101_1110_1010.
Neat, I didn't know they'd done something similar with single quotes. (No law said they had to allow constants to start with an underscore, of course...)
Comments
Probably not possible with ligatures/glyph variants but really cool would be grouping of numbers: In groups of three the first digit would be moved to the right and the last one to the left to simulate a narrow space as thousands separator.
It's a shame the C/C++ standards committee(s) didn't just copy Verilog's base-n notation when they added the "0b" prefix. It's nice to be able to write large constants with optional underscores every four or eight digits, e.g. 32'hffff_0867_5309_beef, or 12'b1101_1110_1010.
You can write 1'000'000 for a million in C++14. http://en.cppreference.com/w/cpp/language/integer_literal.
They didn't use underscores because _100_000 is a valid identifier in C/C++.
Arbitrary bases aren't there.
Neat, I didn't know they'd done something similar with single quotes. (No law said they had to allow constants to start with an underscore, of course...)
I suspect that it's possible, but would require an impractical number (1000) of ligatures in the font.
I wander if it would correctly draw:
and not do: assuming its parsed left to right?It’s possible with classes https://medium.com/@larsenwork/class-based-contextual-positi...
And assume we only support 4-10 digit numbers, it would require e.g. 6 rules or so.
But substitutions are done left-to-right, that might be a problem