Revive #1040 - spec/function.d#2004
Merged
CyberShadow merged 1 commit intodlang:masterfrom Jan 19, 2018
Merged
Conversation
Contributor
|
Thanks for your pull request, @wilzbach! Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. |
8dbf2a7 to
43e6e39
Compare
43e6e39 to
fde544c
Compare
fde544c to
9b454c0
Compare
MetaLang
suggested changes
Dec 23, 2017
spec/function.dd
Outdated
|
|
||
| $(P The maximum guarantee of `pure` is called "strong purity". It can enable | ||
| optimizations based on the fact | ||
| that a function is guaranteed to not mutate anyhing which isn't passed to it, |
spec/function.dd
Outdated
| $(P The maximum guarantee of `pure` is called "strong purity". It can enable | ||
| optimizations based on the fact | ||
| that a function is guaranteed to not mutate anyhing which isn't passed to it, | ||
| and in cases where the compiler can guarantee that a pure function cannot |
Member
There was a problem hiding this comment.
Very long run-on sentence. Consider breaking it up.
| and in cases where the compiler can guarantee that a pure function cannot | ||
| alter its arguments, it can enable full, functional purity (i.e. the guarantee | ||
| that the function will always return the same result for the same arguments). | ||
| To that end, a pure function: |
Member
There was a problem hiding this comment.
This line is repeated again just below.
spec/function.dd
Outdated
| $(H2 $(LNAME2 interpretation, Compile Time Function Execution (CTFE))) | ||
|
|
||
| $(P Functions which are both portable and free of side-effects can be | ||
| $(P Functions which are both portable and free of side-effects to the global state can be |
Member
There was a problem hiding this comment.
A better term might be "global side-effects".
spec/function.dd
Outdated
|
|
||
| $(UL | ||
| $(LI $(DDSUBLINK expression, ArrayLiteral, constructing an array) on the heap) | ||
| $(LI resizing an array with writing its $(D .length) property) |
Member
There was a problem hiding this comment.
"with writing its" -> "by writing to its"
spec/function.dd
Outdated
| $(LI Cannot access $(D __gshared) variables.) | ||
| ) | ||
|
|
||
| $(P With the array indexing and slicing, an out of bounds access |
Member
There was a problem hiding this comment.
This might be better written as "when indexing or slicing an array".
9b454c0 to
044d197
Compare
Contributor
Author
|
Addressed the review and found the stray parenthesis. |
MetaLang
approved these changes
Jan 7, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Part of the revival of #1040.