Hi Stuart,

I wasn't very clear.

Essentially, the problem I have boils down to having to maintain two
separate code bases for my API - one in C# and one in Java.  There is some
overhead in maitaining two different code bases - for instance, whenever, I
fix a bug in one or add a feature in one, I need to do the same in the
other.  I also need to write all my unit test cases in each language for
both APIs, adding more work still.

Given that both Clojure and ClojureCLR exists, it should be theoretically
possible to write the logic of my API in the Clojure language and run them
on both the JVM, or the CLR.  As I would need to do networking with my API,
all the runtime specific stuff, I could wrap with a common interface andthen
call them from Clojure.  In this case, I would only need to maintain one API
logic, and two runtime specific abstraction wrappers.

Unfortunately, as I am writing an API, and not my own application, I would
still need to provide a Java or C# wrapper so that other people who don't
use or know Clojure and can interface with my code - which again is more
work.

So the question is - would it make sense to specify that interface (ie. the
Java and C# ones) in a language neutral specification with Clojure data
structures, then from those data structures generate Java wrappers and C#
wrappers around my clojure API logic code?

There may not be such a solution in existence today - so essentially, the
question is does such a solution make sense?

Is that feasible or even possible or desirable?  Or am I just being silly?

Cheers,

-John

On Sat, Oct 31, 2009 at 1:16 AM, Stuart Sierra
<the.stuart.sie...@gmail.com>wrote:

>
> On Oct 30, 6:18 am, John Ky <newho...@gmail.com> wrote:
> > I've been wondering if there was a way to specify the Java and C# wrapper
> > classes/interfaces to wrap Clojure code in Clojure, and then writing out
> > them to a file so that they can ge compiled by their respective
> compilers.
>
> I'm not sure I understand your question.  There are two distinct
> versions of Clojure: the original, which targets the JVM, and
> ClojureCLR, which targets the CLR.  Neither one generates Java or C#
> source code; both generate bytecode for their respective runtimes.
>
> ClojureCLR is at http://github.com/richhickey/clojure-clr
>
> -SS
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to