On Aug 28, 2009, at 10:01 AM, Shawn Hoover wrote:

> Why wouldn't #"" produce whatever the corollary regex object is on
> each host platform?
>
> I had a couple suggestions on clojure-dev for ClojureCLR that line  
> up with the "produce the corollary idea": 
> http://groups.google.com/group/clojure-dev/browse_thread/thread/d4286dac9f1cf8ba/7e05daa7b782c075
>  
> .

Yeah, I wanted to find that thread yesterday, but (surprise!) couldn't.

>  Tangentially, if I think ahead a couple of 'moves', I'd think that
> perhaps there's a desire to have clojure code that is thoroughly
> portable between, say, Java and .NET host platforms.
>
> Essentially, as Chouser noted, #"" and re-seq as currently defined  
> in Clojure get you pretty far as a portable API. However, unless the  
> platforms agree on literal regex syntax (they don't, beyond the  
> basic "asdf|[0-9]+" features) will prevent true portability of the  
> literals.

Indeed.  FWIW, I was *definitely not* suggesting that soup-to-nuts  
portability across host platforms is a good idea -- I just see things  
that make me think that others would lean in that direction.

On Aug 28, 2009, at 9:00 AM, Rich Hickey wrote:

> I don't think moving specific applications between JVM/CLR/JS is a
> target, nor should it be. People need to move their expertise in the
> language, and core libraries, to different applications, which might
> have different target platforms.
>
> So, UI/web/DB libs IMO should not be portable. Life is too short.

I agree completely.  You can (and many have) spend a lifetime shimming  
APIs (or reimplementing them, for that matter).  People will do what  
they want of course, but there's a huge opportunity cost attached.

> Regex is interesting - is there a lot of core library code that uses
> it? Are there portable alternatives? It is quite likely that the
> native regex support on any platform will be best for that platform,
> so I'm inclined to think that #"" should follow "when in Rome"
> principles, and the burden should be on those who want portable regex
> to use something portable and eschew #"", but as I've said before, I'm
> not much of a regex user.

AFAIC, regex engines are platform facilities, like threading is.   
There's always going to be off-by-one differences (like those related  
to .NET's regex impl, nevermind the vastly different javascript impl),  
and any reimplementation will not be as heavily used, tested, or be as  
fast or feature-complete as the host platform's facility.  The same  
goes for concurrency approaches, graphics contexts, networking, etc.  
etc.

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