On Saturday, 31 March 2018 at 20:44:13 UTC, Andrei Alexandrescu
wrote:
Yah, only strongly pure functions would qualify. Indeed that's
easy for the compiler to figure - so I'm thinking
pragma(isStronglyPure, expression) would be easy to define.
What would be some good uses of this?
Andrei
On Sunday, 1 April 2018 at 14:33:14 UTC, Andrei Alexandrescu
wrote:
On 4/1/18 9:39 AM, Uknown wrote:
On Sunday, 1 April 2018 at 10:23:40 UTC, Andrei Alexandrescu
wrote:
On 4/1/18 2:22 AM, Uknown wrote:
[...]
Terrific, thanks!!
Created the PR: https://github.com/dlang/phobos/pull/6403
On 4/1/18 9:39 AM, Uknown wrote:
On Sunday, 1 April 2018 at 10:23:40 UTC, Andrei Alexandrescu wrote:
On 4/1/18 2:22 AM, Uknown wrote:
[...]
That's a great initiative, and a worthy trait for the stdlib. I think
you'd have an easier time if you reasoned from the other end. A
function is
On 4/1/18 9:46 AM, Jonathan M Davis wrote:
In principle, a function which has const parameters could be treated as
strongly pure if it's given immutable arguments
I want to give coders leeway to cheat on that. I'll explain later
(allocators).
On Sunday, April 01, 2018 06:23:40 Andrei Alexandrescu via Digitalmars-d
wrote:
> On 4/1/18 2:22 AM, Uknown wrote:
> > On Sunday, 1 April 2018 at 05:27:38 UTC, Uknown wrote:
> >> [...]
> >>
> >> I knew I was missing something. Fixed it, thanks
> >>
> >> https://run.dlang.io/is/tZeZrP
> >
> >
On Sunday, 1 April 2018 at 10:23:40 UTC, Andrei Alexandrescu
wrote:
On 4/1/18 2:22 AM, Uknown wrote:
[...]
That's a great initiative, and a worthy trait for the stdlib. I
think you'd have an easier time if you reasoned from the other
end. A function is strongly pure if all of the following
On 4/1/18 2:22 AM, Uknown wrote:
On Sunday, 1 April 2018 at 05:27:38 UTC, Uknown wrote:
[...]
I knew I was missing something. Fixed it, thanks
https://run.dlang.io/is/tZeZrP
Sorry for the spam, but I also managed to miss `immutable`, `const` and
when T has mutable indirections
Final
On Sunday, 1 April 2018 at 05:27:38 UTC, Uknown wrote:
[...]
I knew I was missing something. Fixed it, thanks
https://run.dlang.io/is/tZeZrP
Sorry for the spam, but I also managed to miss `immutable`,
`const` and when T has mutable indirections
Final version that I'm sure covers all the
On Sunday, 1 April 2018 at 04:30:03 UTC, Nicholas Wilson wrote:
On Sunday, 1 April 2018 at 04:11:37 UTC, Uknown wrote:
On Friday, 30 March 2018 at 20:28:27 UTC, Andrei Alexandrescu
wrote:
[...]
Just for the fun of it, I implemented this as a template:
https://run.dlang.io/is/pXLndG
You're
On Sunday, 1 April 2018 at 04:11:37 UTC, Uknown wrote:
On Friday, 30 March 2018 at 20:28:27 UTC, Andrei Alexandrescu
wrote:
https://www.reddit.com/r/programming/comments/88aqsf/the_joy_of_max/
Discussion aside, I notice with pleasant surprise gcc has an
introspection primitive we didn't think
On Friday, 30 March 2018 at 20:28:27 UTC, Andrei Alexandrescu
wrote:
https://www.reddit.com/r/programming/comments/88aqsf/the_joy_of_max/
Discussion aside, I notice with pleasant surprise gcc has an
introspection primitive we didn't think of: __is_constant that
(I assume) yields true if the
On 3/31/18 8:35 PM, Nicholas Wilson wrote:
On Saturday, 31 March 2018 at 20:44:13 UTC, Andrei Alexandrescu wrote:
Yah, only strongly pure functions would qualify. Indeed that's easy
for the compiler to figure - so I'm thinking pragma(isStronglyPure,
expression) would be easy to define.
What
On Saturday, 31 March 2018 at 20:44:13 UTC, Andrei Alexandrescu
wrote:
Yah, only strongly pure functions would qualify. Indeed that's
easy for the compiler to figure - so I'm thinking
pragma(isStronglyPure, expression) would be easy to define.
What would be some good uses of this?
Andrei
On 3/31/18 4:01 PM, Simen Kjærås wrote:
On Saturday, 31 March 2018 at 19:18:24 UTC, Shachar Shemesh wrote:
struct S {
int a;
void func(int b) pure {
// For some strange reason, this is not considered a pure violation.
a+=b;
}
}
It's the exact equivalent of this code:
void
On Saturday, 31 March 2018 at 19:18:24 UTC, Shachar Shemesh wrote:
struct S {
int a;
void func(int b) pure {
// For some strange reason, this is not considered a pure
violation.
a+=b;
}
}
It's the exact equivalent of this code:
void func(ref S s, int b) pure {
S.a += b;
}
On 30/03/18 23:35, Stefan Koch wrote:
On Friday, 30 March 2018 at 20:28:27 UTC, Andrei Alexandrescu wrote:
https://www.reddit.com/r/programming/comments/88aqsf/the_joy_of_max/
Discussion aside, I notice with pleasant surprise gcc has an
introspection primitive we didn't think of:
On Friday, 30 March 2018 at 20:28:27 UTC, Andrei Alexandrescu
wrote:
https://www.reddit.com/r/programming/comments/88aqsf/the_joy_of_max/
Discussion aside, I notice with pleasant surprise gcc has an
introspection primitive we didn't think of: __is_constant that
(I assume) yields true if the
17 matches
Mail list logo