Re: vim70: Dictionaries echo vs echom: Bug?

2006-12-13 Thread Thomas
You can already do quite a lot if you define your own assert function or command for this. Ok, I now uploaded a plugin[1] that does this. Maybe somebody finds this useful too. The handling of script local functions is suboptimal though, which is why I still think this should be integrated

Re: vim70: Dictionaries echo vs echom: Bug?

2006-12-12 Thread Bram Moolenaar
Sanoblast wrote: Looking back, now that Vim script has become much more complex, a bit more type checking would be good. A valid point. Mabye this could be done by an assert command/function that checks its arguments or does nothing depending on an option (maybe

Re: vim70: Dictionaries echo vs echom: Bug?

2006-12-11 Thread Bram Moolenaar
Thomas wrote: As mentioned in the documentation, automatic conversion only happens between numbers and strings, not with Lists and Dictionaries. This is to avoid mistakes, e.g., trying to concatenate a List and a String. Something like let l = [1,2,3] exec Foo . l could

Re: vim70: Dictionaries echo vs echom: Bug?

2006-12-11 Thread Thomas
Looking back, now that Vim script has become much more complex, a bit more type checking would be good. A valid point. Mabye this could be done by an assert command/function that checks its arguments or does nothing depending on an option (maybe 'debug')/flag/variable? Problem

Re: vim70: Dictionaries echo vs echom: Bug?

2006-12-10 Thread Thomas
As mentioned in the documentation, automatic conversion only happens between numbers and strings, not with Lists and Dictionaries. This is to avoid mistakes, e.g., trying to concatenate a List and a String. Something like let l = [1,2,3] exec Foo . l could come handy though -- which

Re: vim70: Dictionaries echo vs echom: Bug?

2006-12-10 Thread Thomas
Something like let l = [1,2,3] exec Foo . l could come in handy though -- which isn't possible now. Although I just realized that lists seem to be passed on by reference and this would create a new copy if the string presentation of a list were a parseable list. Which leads to another

Re: vim70: Dictionaries echo vs echom: Bug?

2006-12-10 Thread Thomas
let l = [1,2,3] exec Foo . l Which leads to another point: How do I pass a list by reference to Foo Sorry, I somehow seem to have forgot what the original problem was -- which I should able to solve with the function() call() functions.