> OTOH, with & there is no ambiguity because the various uses of & are
> strictly separated:
Actually, there still is ambiguity unless one requires a decimal point or
exponent. Without that restriction
&123.456
could still mean 123 (or 123.0) concatenated with 456. But with the restriction
&123
is invalid. Not sure whether that's desirable. Probably the lesser of two
evils.
Of course, it needs to be enforced that printf and such functions either omit
the
ampersand for floats which happen to be integers (probably undesirable) or
always
append a '.0' in this case.
Would wrapping floats in braces be a better syntax? I don't think this would
clash
with anything: dictionaries require keys followed by colons which don't occur
in
floats, and a float is also an invalid variable or function name due to
starting
with a digit or sign (+/-) so couldn't be used as part of curly-brace variable
or
function names. E.g.
:let myfloat={12.52}
:let mybig={1234e56}
:let myintegerfloat={123}
To me, this is nicer than a leading &, and avoids the nasty restriction of
needing
a decimal point all the time/ambiguity of decimal point vs. concatenation.
Ben.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---