Skip to content

fix Issue 17787 - Add a BetterC predefined version so libraries can adapt#7132

Merged
dlang-bot merged 1 commit intodlang:masterfrom
WalterBright:D_betterC
Sep 10, 2017
Merged

fix Issue 17787 - Add a BetterC predefined version so libraries can adapt#7132
dlang-bot merged 1 commit intodlang:masterfrom
WalterBright:D_betterC

Conversation

@WalterBright
Copy link
Member

No description provided.

@dlang-bot
Copy link
Contributor

Thanks for your pull request, @WalterBright!

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

Copy link
Member

@PetarKirov PetarKirov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this! One minor nitpick:

}

// https://issues.dlang.org/show_bug.cgi?id=17787
version (D_betterC)
Copy link
Member

@PetarKirov PetarKirov Sep 10, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since all other predefined versions prefixed by D_ are using the PascalCase naming convention, perhaps we should use D_BetterC for consistency.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I decided that consistently calling it betterC was a better idea :-)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough

@WalterBright
Copy link
Member Author

Doc pull: dlang/dlang.org#1892

@dlang-bot dlang-bot merged commit ca27ec4 into dlang:master Sep 10, 2017
@WalterBright WalterBright deleted the D_betterC branch September 10, 2017 22:47
JohanEngelen added a commit to JohanEngelen/ldc that referenced this pull request Oct 25, 2017
Cherry-pick from upstream DMD, dlang/dmd#7132
JohanEngelen added a commit to JohanEngelen/ldc that referenced this pull request Oct 25, 2017
Cherry-pick from upstream DMD, dlang/dmd#7132
@dnadlinger
Copy link
Contributor

Please let's make this D_BetterC instead. We also have D_Coverage (rather than D_cov) and D_NoBoundsChecks (rather than D_noboundscheck).

@dnadlinger
Copy link
Contributor

dnadlinger commented Oct 25, 2017

I'd also argue that we should have per-feature versions rather than a kitchen-sink flag, where the meaning changes between compiler versions as more stuff is added to -betterC. This looks like another quick knee-jerk addition that could do with just a modicum of design thought.

@WalterBright
Copy link
Member Author

Please let's make this D_BetterC instead. We also have D_Coverage (rather than D_cov) and D_NoBoundsChecks (rather than D_noboundscheck).

@klickverbot I agree. How about making a PR to do it?

@WalterBright
Copy link
Member Author

per-feature versions

I'd rather not, as one could as well argue that every semantic change to the language should have a predefined version. Things could turn into a hopeless swamp very easily. Besides, there are very few current users of betterC and I expect it to settle down fairly quickly.

PetarKirov added a commit to PetarKirov/dmd that referenced this pull request Oct 26, 2017
…ency

with other predefined version identifiers, like `D_NoBoundsChecks`.
As discussed in dlang#7132 (comment).
@PetarKirov
Copy link
Member

How about making a PR to do it?

@WalterBright Here it is: #7248

kinke pushed a commit to ldc-developers/ldc that referenced this pull request Oct 26, 2017
Cherry-pick from upstream DMD, dlang/dmd#7132
kinke pushed a commit to ldc-developers/dmd-testsuite that referenced this pull request Nov 3, 2017
…ency

with other predefined version identifiers, like `D_NoBoundsChecks`.
As discussed in dlang/dmd#7132 (comment).
joakim-noah pushed a commit to ldc-developers/ldc that referenced this pull request Jun 11, 2018
Cherry-pick from upstream DMD, dlang/dmd#7132
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants