On Tue, May 15, 2012 at 4:03 PM, Timothy Baldridge <tbaldri...@gmail.com>wrote:
> > Why can't it port to Python? You have can have an instance with a method > > toString right? > > The python version of that code (at least in clojure-py) would be this: > > (defn as-str [x] (py/str x)) > That would be defined core.cljs - it doesn't have much to do with the compiler. (defn as-str [x] (.toString x)) is perfectly valid code and should compile anywhere. > So my point is that some platforms may define toString, other define > str and still others (CLR) define ToString. There will have to be some > translator layer for each and every native function called from inside > the compiler. There doesn't need to be any special handling of any kind in the compiler for this case. People will need to adapt core.cljs. 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