Hacker News new | ask | show | jobs
by zeristor 393 days ago
Apostrophe as a number separator?

Where’s that from?

2 comments

Switzerland and Italy for two. https://en.wikipedia.org/wiki/Decimal_separator#

Also note C++14 introduced the apostrophe in numeric literals! https://en.cppreference.com/w/cpp/language/integer_literal

I've started using the underscore in my code since that is becoming the (non-localized) standard and trendy:

https://en.wikipedia.org/wiki/Integer_literal#Digit_separato...

Learn somethin new every day.

And I would never have known this existed without hackernews

Interesting that Sweden explicitly do NOT use it... Not sure where i picked it up! :-)
Apostrophe are nice because they are not ambiguous. Started using them myself after getting used to them from C++ and learning that they are used in switzerland.