[Issue 11365] Allow D source file names to have no extension (or an arbitrary extension)

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Nov 11 03:09:17 PST 2013


https://d.puremagic.com/issues/show_bug.cgi?id=11365



--- Comment #21 from Leandro Lucarella <leandro.lucarella at sociomantic.com> 2013-11-11 03:09:03 PST ---
(In reply to comment #19)
> Some points:
> 
> 1. dmd foo
> will compile 'foo.d' and create 'foo.exe' on Windows. So if 'foo' is allowed to
> be a D source file, this works fine. But on Linux, compiling source code 'foo'
> and creating executable file 'foo' will overwrite the source file. You'll have
> to specify -of, too.

This is another (critical!) issue to fix to claim DMD can replace scripting
languages: https://d.puremagic.com/issues/show_bug.cgi?id=5243

> 2. If you wish to name a script file 'foo.bar', D uses the file name as the
> module identifier. D does not allow non-identifier characters in the module
> identifier. This means you cannot also have scripts named '7foo(!)%^bar'
> either.

This is another problem. What about creating a random module identifier for the
file being passed to DMD when -run is used (and no module name has been set
explicitly)?

As I said in the pull requests, for DMD to fully support the scripting domain,
it needs to be able to accept arbitrary names. A script is a binary and DMD
should not limit how you can name binaries, is like limiting what you can pass
to -of.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list