[Issue 11365] New: Allow D source file names to have no extension
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Oct 26 14:10:22 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11365
Summary: Allow D source file names to have no extension
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: bugzilla at digitalmars.com
--- Comment #0 from Walter Bright <bugzilla at digitalmars.com> 2013-10-26 14:10:21 PDT ---
---- eles writes ----
This forces scripts to bear the .d extension. For example, if you write a
script on Linux named "git-test" and you put at the top:
#!rdmd
rdmd will pass its name to dmd, and dmd will try to compile... "git-test.d",
which does not exist.
Now, you have either to rename the "git-test" into "git-test.d", or to create a
hardlink named "git-test.d" that points towards "git-test" so that dmd finally
gets satisfied its ".d" hungriness.
The solution with the hardlink carries the well-known burden of redundancy,
let's not even say its idiot and makes back-up-ing a mess.
OTOH, renaming the original script into "git-test.d" has the undesirable effect
wrt to git software.
git uses some nice convention that you can extend its command list by writing
your own "git-command1", "git-command2" scripts and they are invoked
automatically by git when you type:
"git command1" (this will invoke "git-command1") etc.
The problem with being forced to rename "git-command1" into "git-command1.d" is
that, afterwards, you have to type the following command for git:
"git command1.d" (in order to have the "git-command1.d" invoked, as
"git-command1" simply does not exist or, if it would exist, dmd would be blind
about it).
SO, you cannot type "git command1" and to have a "git-command1" script invoked,
because git won't search for "git-command1.d", while dmd won't compile
"git-command1".
So you need both "git-command1" and "git-command1.d" doing the same thing, just
to be able to type "git command1" (not even say that this allows you to invoke,
also "git comman1.d", which is ugly and undesired redundancy).
Now, immagine yourself having to type:
"git checkout.d ."
"git commit.d"
"git log.d"
instead of
"git checkout ."
"git commit"
"git log"
and tell me that ".d" is not an issue.
----------------------
To that end, I propose that for:
dmd foo
that it will treat 'foo' as the source file if it does not find foo.d or
foo.di.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list