Re: 'version'-based code selection

2019-06-02 Thread Jonathan M Davis via Digitalmars-d-learn
On Sunday, June 2, 2019 11:43:09 AM MDT Anonymouse via Digitalmars-d-learn wrote: > On Saturday, 1 June 2019 at 07:46:40 UTC, Jonathan M Davis wrote: > > For the most part though, you don't declare your own version > > identifiers. It sometimes makes sense, but usually, version > > identifiers

Re: 'version'-based code selection

2019-06-02 Thread Anonymouse via Digitalmars-d-learn
On Saturday, 1 June 2019 at 07:46:40 UTC, Jonathan M Davis wrote: For the most part though, you don't declare your own version identifiers. It sometimes makes sense, but usually, version identifiers are used for versioning code based on the platform or architecture that it's compiled on.

Re: 'version'-based code selection

2019-06-02 Thread Yatheendra via Digitalmars-d-learn
On Saturday, 1 June 2019 at 07:46:40 UTC, Jonathan M Davis wrote: Like static ifs, version statements are completely a compile-time construct and having nothing to do with runtime beyond how they affect the code that's generated. ... - Jonathan M Davis Thanks for taking the time. That's

Re: 'version'-based code selection

2019-06-01 Thread Jonathan M Davis via Digitalmars-d-learn
On Friday, May 31, 2019 9:59:13 PM MDT Yatheendra via Digitalmars-d-learn wrote: > Hi people. > > The 'version' keyword sounds like a fantastic capability, but how > far does DMD take it (and does GDC take it equally far)? This is > not a "D Improvement Proposal", I am just asking how it is now.

Re: 'version'-based code selection

2019-05-31 Thread rikki cattermole via Digitalmars-d-learn
On 01/06/2019 3:59 PM, Yatheendra wrote: Hi people. The 'version' keyword sounds like a fantastic capability, but how far does DMD take it (and does GDC take it equally far)? This is not a "D Improvement Proposal", I am just asking how it is now. GDC, LDC and DMD all share the same

'version'-based code selection

2019-05-31 Thread Yatheendra via Digitalmars-d-learn
Hi people. The 'version' keyword sounds like a fantastic capability, but how far does DMD take it (and does GDC take it equally far)? This is not a "D Improvement Proposal", I am just asking how it is now. Can code of multiple versions be compiled into the same executable or library, and