On Aug 28, 2009, at 12:13 PM, Chouser wrote:

> On Fri, Aug 28, 2009 at 10:01 AM, Shawn  
> Hoover<shawn.hoo...@gmail.com> wrote:
>>
>> 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.
>
> This is an interesting and crucial assertion.  If the regex
> syntaxes do not have a useful overlap, only libraries that
> allow regexs to "pass through" from the app to the platform
> (creating no new regex objects of their own) will be
> portable, at which point wrapping the pattern in
> a clojure-something becomes rather less useful (except
> I suppose for the original IFn point).
>
> But is it true?  The amount of overlap between, for example,
> JVM and JavaScript is quite substantial, both having
> borrowed features and syntax quite heavily from perl.
>
> http://www.regular-expressions.info/refflavors.html
>
> I think that a s long as we're not trying to support ancient
> engines (such as sed, awk, emacs...) the subset that
> overlaps would be quite useful.

Any kind of substantial difference in the implementation (and not just  
in the supported feature set) will lead to lots of confusion when  
those differences become apparent.  The key thing is that what's  
substantial to one is unimportant to another.

e.g.: A quick scan of that page shows two really big differences  
between .NET and Java -- only the latter has possessive quantifiers  
(which I've come to love for certain tight jams), and only the former  
has named groups (a feature I dearly miss from my python days when in  
the Java world).  I don't think we do anyone any favors trying to come  
up with a supported regex variant that is only the intersection of the  
host platforms that are of interest (which, of course, will change).

I guess I'm just missing the boat on the motivation here.  Will the  
same principle apply for networking and graphics and concurrency,  
too?  I can't imagine so...

- 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