Thanks Mike, David.

I agree with the conclusion that regex probably isn't the best way to tackle 
these problems.
I'll summarize the use cases since it may apply in later discussions...

1. Is it possible to import parts of a module to avoid potentially large 
network payloads?
2. Is there syntax that would allow the server to group or concatenate delivery 
of multiple modules within one request?


thanks
Kam




From: David Herman <dher...@mozilla.com>
To: Mike Shaver <mike.sha...@gmail.com>
Cc: Kam Kasravi <kamkasr...@yahoo.com>; Brendan Eich <bren...@mozilla.com>; P T 
Withington <p...@pobox.com>; es-discuss Steen <es-discuss@mozilla.org>
Sent: Mon, May 17, 2010 8:22:52 AM
Subject: Re: modules proposal

> For this, I would rather let the exporter define named export lists,
> so that there's better future proofing.  I would hate to be the person
> adding something to the SVG module knowing that there were a bunch of
> regexps floating around the web that might cause me to clobber
> something unexpected.

This gets to my main issue with regexps (aside from the YAGNI aspect) -- it 
puts too much significance into variable names, and becomes a refactoring 
hazard.

> ("*Filter*" isn't even a legal regexp, so they'd get a compilation
> error, but when you have to write SVG..*Filter.*, I think it gets to
> be pretty unwieldy.)

FWIW, you could distinguish this with the regexp syntax, for example:

    import SVG./.*Filter.*/;
    import /.*Filter.*/ from SVG;

But ... um, well, yeah.

Dave
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to