In theory, a turing complete language could do anything.

Not 'do' anything, but 'compute' anything.

And even then, it's not necessarily particularly useful...if it doesn't
have an interface to get the appropriate 'anything' out...or the
appropriate input in. Almost every language is Turing complete, and
Vimscript almost certainly is, though your machine probably doesn't have
an infinite amount of memory. But Vimscript would be pretty useless,
even though Turing complete, if it didn't let you access the text of
your files and operate on it. Fortunately, though, Vim does.

It's a bit of a misunderstanding thinking you don't know Vimscript,
though. If you work in Vim, you already know quite a lot, as Vimscript
is just regular Ex commands. So the learning curve to learning Vimscript
is quite small. Yes, there are a bunch of commands and functions you
will use primarily or exclusively in scripts, but there are plenty you
use both on the commandline and in scripts. Lisp, on the other hand,
isn't the way one usually interacts with Emacs, as far as I know, so
must be learnt separately.

Vim is essentially an imperative procedural language. Lisp is
essentially a functional language. Most people find imperative languages
easier to understand because they're a bit more like recipes and a bit
less like Mathematics! Some people find the reverse, though.

Lisp is certainly more elegant than Vimscript, which is just a mess,
with as many exceptions as rules, and different escaping mechanisms
needed every few lines. If you want to do serious programming, Lisp is
the way to go. If you want a quick hack, Vimscript is probably easier.

Ben.




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

Reply via email to