JetBrainsMono icon indicating copy to clipboard operation
JetBrainsMono copied to clipboard

Add a ligature for grouping digits of numeric literals to improve readability

Open juarezr opened this issue 4 years ago • 3 comments

In Rust language, underscores can be inserted in numeric literals to improve readability, e.g. 1_000 is the same as 1000, and 0.000_001 is the same as 0.000001.

But most of the other programming languages doesn't have this feature.

It would be very interesting if a ligature could improve the reading of large numbers.

juarezr avatar Mar 19 '20 05:03 juarezr

@juarezr Hi, this is an interesting idea. But i believe that it will bring a lot of confusion to people that are not accustomed to this. It will be a nice feature if we could make language specific ligatures. But for now we don't have the ability. But, please don't be discouraged. If you happen to notice some frequently used operator of character sequence send it to me.

philippnurullin avatar Mar 19 '20 08:03 philippnurullin

@philippnurullin

  • JBM already covered the most frequent cases of operators and ligatures. So I don't have anything right now. :smile:
  • I can't imagine the problem of reading a lot of digits from a number related to a specific programming language. It seems to be quite broad to any programmer and for people dealing with databases and tables.
  • Take a look in this interesting post. It could help understanding my point.
  • Also take a look in the hack for some solution examples.

Thanks

juarezr avatar Mar 20 '20 20:03 juarezr

C# also has support for _ as digit seperator starting with C# 7.0

OmegaRogue avatar May 15 '20 14:05 OmegaRogue