ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <pe...@apache.org>
Subject Re: <ant>
Date Mon, 25 Feb 2002 07:45:39 GMT
On Mon, 25 Feb 2002 12:30, Steve Loughran wrote:
> > > dont have a check for them. Just think how many cpu cycles would be
>
> wasted
>
> > > over time if every time a target in ant was created included a look to
> > > verify that nobody was creating a target name containing nothing but
> > > spaces. (yes, I know, you scan forwards till the first non space is
> > > hit, but I take the view if you want to try that hard, we should let
> > > you)
> >
> > I really don't think it is that much of a performance killer. Perhaps
> > 1/1000th of the time spent in the XML parsing :)
>
> I have done too much laptop engineering. It aint just the cycles, it is the
> electrons wasted. Tests waste more than sequential computation as branch
> misprediction turns lithium ions into heat without useful work done.

:)

> > I would just warn when any character not in the set
> >
> > a-z A-Z 0-9 . - _
> >
> > Maybe drop the '.' so names ar emore consistent with defacto xml naming
> > conventions.
>
> But that is at odds with i18n requirements. we need to filter on 'letters
> and numbers in all supported alphabets'. The .NEt compilers do this; I did
> an experimental C# file with russian method names, greek variables. Didnt
> try anything fancy like arabic numerals. The language was smart enough to
> distinguish foreign letters from foreign symbols, enforcing the 'methods
> begin with a letter or an underscore' rule regardless of alphabet of the
> letter.

kool!

It would be nice if we could specify that only characters and numerics in the 
XML files encoding + some special characters (like ":", ".", "-", "_" etc). 
Not sure it is viable though given we no use a DTD

> To return to the higher level issue. Where can I place the warning? putting
> it in Task.setName doesnt work. putting it in execute() wont warn on non
> executed tasks.

Sorry - haven't looked. Personally I would put it in the parsing code...

-- 
Cheers,

Pete

-------------------------
  All things considered, 
 insanity may be the only 
  reasonable alternative.
-------------------------

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message