On Thu, Sep 29, 2011 at 3:39 AM, Hank <h...@123mail.org> wrote:
> I'd like to check the interest in the community for a comprehensive
> Clojure library/framework/whathaveyou that helps produce Java/Python/
> Ruby/... a.k.a. "Blub" (http://www.paulgraham.com/avg.html) code, i.e.
> instead of writing a Clojure program that e.g. produces web pages,
> writing a Clojure program that produces a Blub program that produces
> web pages. A Blub program in idiomatic, maintainable, efficient Blub
> code that is.

I think the major obstacle is likely to be the difference in idioms.
Any substantial idiomatic piece of Clojure is going to be almost
impossible to automatically translate to _idiomatic_ code in another
high-level language that uses different idioms. You'd also probably
have to introduce a number of "coding conventions" to constrain your
Clojure code in order to avoid "holes" in the translation.

Some questions:
* How do you translate Clojure functions in namespaces spread across
multiple files into a Java class?
* Would it even be idiomatic Java to always have classes full of only
static methods?
* What about Clojure's vast library of functions (esp. higher-order)?
* What would something like
    (map (juxt :id identity) (filter (comp not nil? :data)
some-lazy-data-stream))
  look like in Blub, if Blub doesn't have keywords, composition,
higher-order functions, lazy data structures?
* How would code that uses STM translate to a Blub without it?
* How idiomatic would Blub code be when Clojure uses immutable data by default?

I think it's a fascinating problem to try to solve for any given
target Blub but I'm not sure how practical it would be, i.e., how
readable the generated Blub code would be to an "average" Blub
programmer...?
-- 
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/
Railo Technologies, Inc. -- http://www.getrailo.com/

"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novelist (1821-1880)

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