Hi, folks,

The earlier thread where Bram asked for comments on floating point
syntax, after quite a few suggestions were made and rejected for
compatibility reasons, petered out. However, two proposals were made
that I think had merit, and I wonder if people have additional comment
on them, and perhaps may see them if part of a new thread!

The first proposal was mine:

- I pointed out that there is actually possibly ambiguity in the current
   syntax unless a float is required to have a decimal point or exponent,
   as &123.456 could mean float 123.456 or float 123 (123.0) concatenated
   with integer 456. If the requirement is added, the ambiguity is
   removed, but &123 is invalid, which is a bit of a shame.

- I proposed an alternative syntax that I prefer and I think is likely
   to be more robust in the long run: enclosing floats in curly braces.
   E.g. {123.456}. Specifically, a set of curly braces would be taken to
   represent a float if and only if it is (1) not preceded by a valid
   variable name character and (2) contains a valid float. Nobody came up
   with any reason this would not work.

The second was a proposal to represent floats as numbers with decimal
points but no additional punctuation which was implicit in this report
from Ilya Bobir:

- I did a search for vim scripts that use concatenation operation
   between two numbers without interleaving space.  It appears that
   Google Code Search was able to find only 39 matches and all were
   false positives.

Nobody gave any reply to the message.

I would like to note, though, that this doesn't solve the problem for
exponent notation. However, I suspect a search of vim scripts containing
numbers of that form would yield even less results, though I have not
tried it. The search also doesn't take into account expressions that may
be built dynamically in vim scripts rather than being hard coded, but
again, I doubt many if any of these exist.

I personally would prefer either of these syntaxes to the notation with
the ampersand.

Do people have further comments/thoughts on this? Is Bram still
interested in hearing them?

The earlier thread which contains more details can be read here:

http://groups.google.com/group/vim_dev/browse_thread/thread/1c8806e536ec12cd

The relevant posts are at the end. The last 7 or so, which happen to
nicely form the second page of posts at present.

Ben.





--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui