Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is actually folly: both vimscript and lisp are both turing complete language (read can both make a computer do everything a computer is capable of doing), so even know LISP might have nicer syntax/cooler paradigm, what have you: it doesn't matter, you can achieve the same thing in VIM Script. I am a VIM user, although not a fanatical one, I see the merits of having a language like eLISP for emacs, but honestly I think they are both outdated. If I wasn't so partial to using a command line editor (I use the terminal a lot), i'd switch to Sublime text 2 because it uses python, and I'd rather use a modern scripting language than either vimscript or eLISP.


Yes, strictly speaking, Turing completeness implies a certain formal equivalence between the two programming languages.

But does this does not an equivalence between systems make, for at least two reasons:

1. Different languages encourage, and make easy, different modes of thought. Lisp promots a certain view of building hte world out of recursive, replaceable pieces.

2. Different systems provide different levels of access to their internals. The vast majority of Emacs is written in Lisp, and can therefore be hooked and rewritten. Its C code is an Emacs interpreter and text editing/rendering engine. Vim provides a great deal of scripting capability and many hooks, but that's still hooks on a system rather than a system that can be freely rewritten on the fly. It feels very different, and can allow different things if Vim is missing the hook you need.


"But when our hypothetical Blub programmer looks in the other direction, up the power continuum, he doesn't realize he's looking up. What he sees are merely weird languages. He probably considers them about equivalent in power to Blub, but with all this other hairy stuff thrown in as well. Blub is good enough for him, because he thinks in Blub." -from beating the averages


In fairness, elisp is pretty weird. Doesn't it still use dynamic scope? :P

Sincerely, the guy who writes stuff like

  execute a:method . resolve(expand('%:p:h') . "/" . tolower(a:entry) . ".ext")
(Yes, vimscript is insane, too)


As of Emacs 24, either dynamic or lexical binding is available. Dynamic binding is the default though.


>This is actually folly: both vimscript and lisp are both turing complete language (read can both make a computer do everything a computer is capable of doing), so even know LISP might have nicer syntax/cooler paradigm, what have you: it doesn't matter, you can achieve the same thing in VIM Script.

Just because two different things, like two different languages, have the same potential doesn't mean they're equal.


Saying they're both turing complete isn't saying much. Firstly, even when comparing turing complete languages, it can be sometimes easy to pick out a superior one with respect to development (e.g. Brainfuck VS Haskell, also see http://en.wikipedia.org/wiki/Turing_tarpit). Secondly, it's not just about turing completeness, it is also about APIs. These languages -- vim script and emacs lisp -- don't live in total isolation, they live in an environment. Thus, it is not only the language we are comparing, but also the environment/API (what can you call? how is it called? how easy is it to do X? how many tools are available at-hand VS tools I have to build myself? etc.)


They are both Turing-complete, so they can both compute the same things. This is not the same thing as saying they can both do the same things - as others have mentioned, there's the question of what they have access to (hooks/API).


"Beware of the Turing tar-pit[1] in which everything is possible but nothing of interest is easy."

- Alan Perlis

[1] - https://en.wikipedia.org/wiki/Turing_tarpit


This is a misleading statement. Javascript for instance is turning complete even when hosted in the browser. But I cannot write a file to an arbitrary part of disk.


Python scripting inside Vim has been supported for a while. I've never seen a Vim plugin written in it, though, which seems odd given the gripes about VimScript.


Python API is severely limited. For many use cases, you have to issue VimScript commands from your Python script anyway.


The default vim shipping with Ubuntu (12.04, not sure about newer versions) doesn't have Python support.


Are you sure? My VPS runs Ubuntu 12.04.2, only has the vim-common, vim-runtime and vim-tiny packages installed, and `:python echo "Hello world"` works fine.


Parts of Sparkup and UltiSnips are written in Python. I believe YouCompleteMe uses Python too.


I've never been able to get comfortable using emacs no matter how hard I try.

Even vim is just bearable for me and if I'm not using Sublime Text 2, I'm probably using nano.

I hear what you're saying about having a CLI at the ready though. If SublimeXiki worked any better (or is it just me?), I'd say you could easily switch. I'm hoping maybe something coming down the pipe in ST3 will make our situation a little better.


Out of curiosity, what do you think is outdated about the languages? What does Python fix about the languages, especially in the cast of text editors?


Correct me if I'm wrong, but can't extensions for vim 7.3+ be built in python (as long as vim is built with python support)?




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: