digitalmars.D.learn - DMD Compiler 'switches'
- ric maicle (18/18) Oct 12 2015 I'm relearning D. I'm using the reference compiler (DMD) and I am a bit
- anonymous (9/11) Oct 12 2015 As far as I know, the difference just happened, and there is point to it...
- ric maicle (5/13) Oct 12 2015 I think you made it clearer now. And changing it in minor releases will
- Timothee Cour via Digitalmars-d-learn (4/22) Oct 12 2015 Ya I did a while ago: "new DIP41: dmd/rdmd command line overhaul."
- anonymous (2/3) Oct 12 2015 Ugh, should have been: and there is *no* point to it.
- Gary Willoughby (3/22) Oct 12 2015 Yeah, it is a bit confusing and should be tidied up (using the
- =?UTF-8?Q?Ali_=c3=87ehreli?= (6/17) Oct 12 2015 If we accept that = cannot be a part of a file name then we could
- ric maicle (6/10) Oct 12 2015 I think I'm confused. I see the following switches using the = symbol:
- =?UTF-8?Q?Ali_=c3=87ehreli?= (7/17) Oct 12 2015 Perhaps those were introduced after the other ones.
- ric maicle (3/8) Oct 12 2015 Would it be possible to deprecate the old syntax, provide notice to
- ric maicle (4/6) Oct 12 2015 Please ignore. There is already a DIP filed regarding this matter.
I'm relearning D. I'm using the reference compiler (DMD) and I am a bit confused with how the compiler 'switches' are supposed to be used. I find some 'switches' that require an equal (=) symbol when a value is required to be passed in. -boundscheck=[on|safeonly|off] -color[=on|off] -conf=path -debug -debug=level -debug=ident But there are also 'switches' requiring a value that do not require/use the equal (=) symbol. -Dddocdir -Dffilename -odobjdir -offilename I'm wondering if this small irregularity should be made consistent or maybe I misunderstood something.
Oct 12 2015
On Monday 12 October 2015 17:38, ric maicle wrote:I'm wondering if this small irregularity should be made consistent or maybe I misunderstood something.As far as I know, the difference just happened, and there is point to it. The style without "=" is older and wasn't followed when new switches were added. Consistency between different switches has to be weighed against stability here. So far stability has won, I guess. FWIW, dmd seems to be in good company as gcc is in a similar situation. For example, `gcc -std=c11 -ofoo foo.c` is a proper gcc command line, generating the file "foo".
Oct 12 2015
On Tuesday, 13 October, 2015 01:46 AM, anonymous wrote:On Monday 12 October 2015 17:38, ric maicle wrote:I think you made it clearer now. And changing it in minor releases will break build scripts. 'Deprecating' command line switches may be an option and possibly better addressed in a major release. Also, someone may have already filed an issue about this.I'm wondering if this small irregularity should be made consistent or maybe I misunderstood something.As far as I know, the difference just happened, and there is point to it. The style without "=" is older and wasn't followed when new switches were added. Consistency between different switches has to be weighed against stability here. So far stability has won, I guess.
Oct 12 2015
On Mon, Oct 12, 2015 at 11:33 AM, ric maicle via Digitalmars-d-learn < digitalmars-d-learn puremagic.com> wrote:On Tuesday, 13 October, 2015 01:46 AM, anonymous wrote:Ya I did a while ago: "new DIP41: dmd/rdmd command line overhaul." http://forum.dlang.org/thread/mailman.1468.1369129517.4724.digitalmars-d puremagic.comOn Monday 12 October 2015 17:38, ric maicle wrote: I'm wondering if this small irregularity should be made consistent orI think you made it clearer now. And changing it in minor releases will break build scripts. 'Deprecating' command line switches may be an option and possibly better addressed in a major release. Also, someone may have already filed an issue about this.maybe I misunderstood something.As far as I know, the difference just happened, and there is point to it. The style without "=" is older and wasn't followed when new switches were added. Consistency between different switches has to be weighed against stability here. So far stability has won, I guess.
Oct 12 2015
On Monday 12 October 2015 19:46, anonymous wrote:and there is point to itUgh, should have been: and there is *no* point to it.
Oct 12 2015
On Monday, 12 October 2015 at 15:38:27 UTC, ric maicle wrote:I'm relearning D. I'm using the reference compiler (DMD) and I am a bit confused with how the compiler 'switches' are supposed to be used. I find some 'switches' that require an equal (=) symbol when a value is required to be passed in. -boundscheck=[on|safeonly|off] -color[=on|off] -conf=path -debug -debug=level -debug=ident But there are also 'switches' requiring a value that do not require/use the equal (=) symbol. -Dddocdir -Dffilename -odobjdir -offilename I'm wondering if this small irregularity should be made consistent or maybe I misunderstood something.Yeah, it is a bit confusing and should be tidied up (using the established deprecation path) really.
Oct 12 2015
On 10/12/2015 11:34 AM, Gary Willoughby wrote:On Monday, 12 October 2015 at 15:38:27 UTC, ric maicle wrote:If we accept that = cannot be a part of a file name then we could support -D=ddocdir as well, but I checked and = can be used as part of a name at least on Linux. Which may explain why those switches are not consistent with the rest and we cannot support -D= at this point. Ali-Dddocdir -Dffilename -odobjdir -offilename I'm wondering if this small irregularity should be made consistent or maybe I misunderstood something.Yeah, it is a bit confusing and should be tidied up (using the established deprecation path) really.
Oct 12 2015
On Tuesday, 13 October, 2015 02:39 AM, Ali Çehreli wrote:If we accept that = cannot be a part of a file name then we could support -D=ddocdir as well, but I checked and = can be used as part of a name at least on Linux. Which may explain why those switches are not consistent with the rest and we cannot support -D= at this point.I think I'm confused. I see the following switches using the = symbol: -config=path -debuglib=name -defaultlib=name -deps=filename
Oct 12 2015
On 10/12/2015 01:03 PM, ric maicle wrote:On Tuesday, 13 October, 2015 02:39 AM, Ali Çehreli wrote:Perhaps those were introduced after the other ones. I am agreeing with the other posters that we cannot fix the other ones because if anyone used = before, it was the part of the path. (Maybe... Never tried... :) ) So, we cannot change the syntax today because then some users' paths will lose the = character. AliIf we accept that = cannot be a part of a file name then we could support -D=ddocdir as well, but I checked and = can be used as part of a name at least on Linux. Which may explain why those switches are not consistent with the rest and we cannot support -D= at this point.I think I'm confused. I see the following switches using the = symbol: -config=path -debuglib=name -defaultlib=name -deps=filename
Oct 12 2015
On Tuesday, 13 October, 2015 05:43 AM, Ali Çehreli wrote:Perhaps those were introduced after the other ones. I am agreeing with the other posters that we cannot fix the other ones because if anyone used = before, it was the part of the path. (Maybe... Never tried... :) ) So, we cannot change the syntax today because then some users' paths will lose the = character.Would it be possible to deprecate the old syntax, provide notice to all D users and make it obsolete after a year?
Oct 12 2015
On Tuesday, 13 October, 2015 06:11 AM, ric maicle wrote:Would it be possible to deprecate the old syntax, provide notice to all D users and make it obsolete after a year?Please ignore. There is already a DIP filed regarding this matter. DIP41: dmd/rdmd command line overhaul. (http://wiki.dlang.org/DIP41)
Oct 12 2015