D and file names

Russel Winder russel at russel.org.uk
Fri Mar 25 04:27:10 PDT 2011


On Fri, 2011-03-25 at 13:10 +0200, Vladimir Panteleev wrote:
> On Fri, 25 Mar 2011 13:05:39 +0200, Russel Winder <russel at russel.org.uk>  
> wrote:
> 
> > It appears that DMD barfs on files with - in the file name.  Why?
> 
> Do you mean, why doesn't DMD try to work around the problem automatically  
> (e.g. by substituting/removing invalid characters in the module  
> identifier)? The error message answers your verbatim question.

- is a perfectly valid character in a file name, well on Posix compliant
systems anyway.  The question is why D, aping Java, imposes restrictions
when there is no need.

> "test-file-name.d: Error: module test-file-name has non-identifier  
> characters in filename, use module declaration instead"

The real irritant for me is that the file in question has one function,
main,  there is nothing to do with modules going on here.

-- 
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder at ekiga.net
41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel at russel.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20110325/2af6887f/attachment.pgp>


More information about the Digitalmars-d mailing list