On Nov 3, 9:08 am, Sean Devlin <francoisdev...@gmail.com> wrote:
> My understanding is that the current expectation is to allow
> differences in the way each platform does its job.  Contrib currently
> is expected to behave differently on the CLR and the JVM.  For
> example, the str-utils and sql-utils libraries would need to be
> completely re-written to work w/ the CLR.

It would be relatively easy to translate str-utils to the CLR.
It would make no sense to translate sql-utils (JDBC wrapper).

I can't speak to all the nuances of Rich's thinking on the subject,
but I'm pretty sure letting "each platform [do] its job" certainly
applies to sql-utils.  In other words, a library which is a wrapper
around a Java library does not need to be on the CLR platform, and
conversely.

For str-utils, I think the question is more interesting.  It will take
a relatively small set of edits to make it run on the CLR
implmentation, things like changing type hints, modifying method names
-- .toLowerCase becomes .ToLower, for example.

I've done this sort of thing to port core.clj, core_print.clj, etc.
The manipulations are fairly straightforward. I have done them as
manual edits.  In fact, I have tried (successfully)  to modify them
without even disturbing the original line numbers, to ease moving
changes over from the JVM version.

For the core libraries, I think things need to remain this way.  For
other libraries, things in clojure-contrib such as str-utils, the
question is whether there are a few coding techniques that, if
followed, make it easy to write cross-platform code rather than doing
ad-hoc manual editing.    I would propose no changes to Clojure, no
conditional compilation techniques or reader modifications.  Just
things like macros that have simple functionality and that at most
check one flag to conditionalize output.  Word of warning: even this
level of bother may violate Rich's intent.  In which case, I'll go
away.

 I have a few ideas for this, but welcome design input from anyone
with an interest.

It's this, or write a a really nasty Perl script. :)

-David

--~--~---------~--~----~------------~-------~--~----~
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