> > Patch 8.2.3315
> > Problem:    Cannot use single quote in a float number for readability.
> > Solution:   Support single quotes like in numbers. (closes #8713)
> > Files:      src/typval.c, src/float.c, src/proto/float.pro, src/json.c,
> >             src/viminfo.c, src/testdir/test_float_func.vim
> 
> 1) Looking at the following page which shows language supporting
> digit separators https://rosettacode.org/wiki/Numeric_separator_syntax
> the underscore separator appears to be more popular than
> the single quote separator.  It may also make it simpler for
> syntax highlighting as single quotes are used for strings.
>
> Was underscore considered?  Vim9 being experimental,
> there is still time to change if we want.  Anyway, I'm fine
> either way.

I think using underscore for separation is a really bad idea.  It's
quite hard to parse, it's too similar to a dot.  I know of no locale
supporting it.  It's only used in programming languages, afaik.  It
became popular because Java supports it.  Java has made several bad
choices, thus that's not a good reason to do the same.

The single quote is used in some places, it is very common in
Switzerland (the land of banks).  It makes the numbers easy to read.
You can use them without any context, the reader intuitively understands
what it means.

> 2) In blobs, we already had a separator which was dot.
> as in 0z1234.567.  The inconsistency is a bit annoying.

We could use the quote in blobs too.  I'm actually not sure why we used
the dot, perhaps because in some currencies it is used: 123.456.789,00 euro
is 123456789 euro.  But it depends on the locale how dot and comma are
used, which is a hassle in the international internet.

> 3) what digit separators for integers?  Including hex,
> binary, octal integers?

Should be able to use single quote too.

-- 
ARTHUR:  You fight with the strength of many men, Sir knight.
         I am Arthur, King of the Britons.  [pause]
         I seek the finest and the bravest knights in the land to join me
         in my Court of Camelot.  [pause]
         You have proved yourself worthy; will you join me?  [pause]
         You make me sad.  So be it.  Come, Patsy.
BLACK KNIGHT:  None shall pass.
                                  The Quest for the Holy Grail (Monty Python)

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202108081817.178IHelr2183044%40masaka.moolenaar.net.

Raspunde prin e-mail lui