On 23/06/08 18:40, Ben Schmidt wrote:
While working on the Float printing function, I also noted an odd Vim
behaviour: it won't let you assign a Float to a variable that was
previously a Number, and vice-versa. Or for that matter, it won't let
you change the type of a variable at all with an
Bram Moolenaar wrote:
Ben Schmidt wrote:
While working on the Float printing function, I also noted an odd Vim
behaviour: it won't let you assign a Float to a variable that was
previously a Number, and vice-versa. Or for that matter, it won't let
you change the type of a variable at all with
On 24/06/08 05:02, Ben Schmidt wrote:
Bram Moolenaar wrote:
Ben Schmidt wrote:
While working on the Float printing function, I also noted an odd Vim
behaviour: it won't let you assign a Float to a variable that was
previously a Number, and vice-versa. Or for that matter, it won't let
you
It's called sticky type checking. Not everybody likes it, but that's
the way it is.
I guess it has analogies with languages such as C that use static
typing.
But does it actually have any benefit in Vim script? I can't think of
one. I mean, do people actually see this error and think, I