On Sat, May 11, 2013 at 03:50:50PM +0200, Bram Moolenaar wrote:
>If most things are already possible, then it should be possible to write
>Python functions that work as a nice interface for the functionality.
>Thus not change the C implementation of the Python interface.
Where it is feasible to implement it directly in python that sounds like
a good idea to me since it would probably ease the future maintenance
and allow more people to contribute to it.
Though for some of the suggested additions I imagine that it will
negatively impact the performance and/ or be difficult to implement (e.g.
getting the escaping right for eval(), reliably parsing the output of
commands etc.). But that's something where ZyX probably can give more
qualified comments than I could.
>We also need to keep in mind that all the Vim functionality is nicely
>documented and there are examples, while if we add a different way to do
>this in Python this requires documenting how that works. Thus a script
>writer will have two sets of functionality to learn to use. It will be
>good to have "how it's done in Vim" to be very similar to "how it's done
>in Python". Otherwise it gets very complicated.
I see that differently, currently people will have to learn quite a bit of
VimL to get anything useful done with the vim interface. For someone who is
new to vim, but already knows python, a "pythonic" interface is much
more useful then having to do eval("vimL_code()") all the time.
Some of the people I converted to vim users will probably never touch
VimL, but if it where possible to write plugins purely in python with a
pythonic interface they could write plugins for themselves as well
(since I also converted them to python ;))
So, from that point of view the additions proposed by ZyX sound very
good to me (whether implement in C or python, as long as it works "out
of the box").
On the sixth day God created man
On the seventh day, man returned the favor.