17 comments

[ 3.0 ms ] story [ 43.4 ms ] thread
Does anyone have a favorite learning OCaml resource?
I like both Emacs and OCaml but I can't see a case where I would want to use Ecaml. In what situation is it useful?
In Emacs 25 you can write native plugins loaded dynamically at runtime. With this you can do it in OCaml instead of C. Of course you can write it in anything else that will expose the right C interface.
I suppose that begets the question, why would I write a native plugin instead of using elisp? I'm guessing the answer is so I can do some sort of background work in another thread?
That, or for speed, or in order to take advantage of already extant library functions rather than reimplementing them in Emacs Lisp, or some combination of the above.
You can use the ocaml toolchain (for instance: ocamllex and ocamlyacc) and stop writing ad hoc parsers.
That makes sense. Thanks.
Can it be true? Can we finally write our Emacs plugins in Scheme or Common Lisp, and have them work?

Wait, then we'll have 2 GCs fighting over data. Dang it. We were almost free!

Seriously, though, I do have some concerns. If the new Plugin API becomes widely used enough, elisp may become a second-class citizen in the ecosystem, which would mean that emacs would no longer be easily programmable. That would be bad.

Considering the amount of code written out there for emacs making the original scripting language a second class citizen would be an enormous undertaking. Most other languages have taken years to convince people to upgrade (Python, Perl.. ) . I really don't think having elisp as a second class citizen would happen anytime soon.
Exactly, the elisp monoculture is a feature not a bug.
Well, so long as extensions have to pass elisp data, it's okay-ish.