Re: [groovy-dev] Can't run a file with - in it
Also, two different scripts with two different file names could map to
the same class name, so that e.g Ricky+Cory+Trever.groovy and
Ricky-Cory-Trevor.groovy would have a collision.
Best,
Martin
Jochen Theodorou wrote:
> Russel Winder schrieb:
>> On Fri, 2008-08-15 at 15:55 +1000, Luke Daley wrote:
>>
>>> In my opinion, the fact that a script creates a class of the same
>>> name is an implementation detail and for the majority of usage
>>> doesn't come into play. I see it as more likely that users will want
>>> 'illegal' characters in their script filenames, than want to use the
>>> classname of the script.
>>
>> That certainly works for me, but it must be an explicit thing that the
>> file name rules for scripts and the file name rules for classes are
>> different. The boundary point is: when is the file name used to create
>> a class name compared to when is the file name simply checked for
>> consistency with the class name.
>>
>> Mapping '-' to '_' works for me.
>
> for me the concern is reverse mapping. If the script depends on another
> script and that script has a name that is illegal for Java, then what do
> we do? The first script needs to lookup he second script by classname.
> But for one classname with "_" in it, there exists a variety of possible
> file names. It would be better if we had a 1:1 mapping or something near
> that.
>
> bye blackdrag
>
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email