emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [SUGGESTION] separate ob-clojure.el into Clojure part ob-clojure.el


From: Daniel Kraus
Subject: Re: [SUGGESTION] separate ob-clojure.el into Clojure part ob-clojure.el and ClojureScript part ob-clojurescript.el
Date: Sun, 19 Mar 2023 21:46:46 +0100

Ihor Radchenko <yantar92@posteo.net> writes:

> stardiviner <numbchild@gmail.com> writes:
>
>> For now, ob-clojure.el contains lot of code for ClojureScript. Only some
>> code has same functionality. Like CIDER backend. In the future,
>> ClojureScript part code will increase and different. So I suggest
>> separate them into two source code files.
>>
>> WDYT?

I'm not opposed to it, but I'm also not sure if it's worth it.
Without whitespace and comments, ob-clojure is only 261 LOC and without
having a closer look I would guess we would have to duplicate maybe 150
of those in ob-clojurescript.
It would make the implementation a bit cleaner but at the cost of
code duplication.
I would say we wait until the ClojureScript part really grows bigger
and then do a split if that should ever happen.
I could also see a scenario where we add support for ClojureDart
and/or ClojureCLR to ob-clojure. It would be very simple if they
have a CLI like the JVM Clojure.


> The only downside is that people might need to
> (require 'ob-clojurescript)
> I am thinking if ob-core.el should try to automatically guess the
> correct library to be loaded.

We could just (require 'ob-clojurescript) inside ob-clojure.el ?!

Cheers,
  Daniel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]