Daniel Murphy:
> function shouldn't be required once
> http://d.puremagic.com/issues/show_bug.cgi?id=3235 is fixed.
OK.
> > 3827 automatic joining of adjacent strings is bad [partial patch present]
> The patch for this seems solid, I might make a pull for it after the
> release.
Is a good en
"bearophile" wrote in message
news:iva7iv$b6v$1...@digitalmars.com...
>> Still, it should make construction of immutable structures without
>> casting a lot easier.
>
> I presume you mean something like this ("function" is currently required
> if you want to add "pure" too):
>
Or use a nested f
Daniel Murphy:
> Only for strongly pure functions - not const pure at this point.
I see, OK.
> Still, it should make construction of immutable structures without casting a
> lot easier.
I presume you mean something like this ("function" is currently required if you
want to add "pure" too):
"bearophile" wrote in message
news:iv9grs$286j$1...@digitalmars.com...
>> Seeing the recent large amount of pull requests I am seeing, is someone
>> willing to implement this type system feature?
>
> yebblies delivers, quickly too :-)
> http://d.puremagic.com/issues/show_bug.cgi?id=5081
> https:
> Seeing the recent large amount of pull requests I am seeing, is someone
> willing to implement this type system feature?
yebblies delivers, quickly too :-)
http://d.puremagic.com/issues/show_bug.cgi?id=5081
https://github.com/D-Programming-Language/dmd/pull/218
At this rhythm of improvements D
Jonathan M Davis:
> Regardless, the overall situation with purity is improving.
I agree. Someday I hope to see another little improvement in the D type system,
to allow code like this to compile without the need of a cast of s2 to string
at the end:
string foo(in string s) pure nothrow { // st
On 2011-07-07 15:19, bearophile wrote:
> KennyTM~:
> > On Jul 8, 11 00:43, KennyTM~ wrote:
> > > No, I think it's a bug in pure-inference.
> > >
> > > pure int h() {
> > >
> > > return 1;
> > >
> > > }
> > > int f(alias g)() {
> > >
> > > return g();
> > >
> > > }
> > > pure int i() {
> > >
>
KennyTM~:
> On Jul 8, 11 00:43, KennyTM~ wrote:
> > No, I think it's a bug in pure-inference.
> >
> > pure int h() {
> > return 1;
> > }
> > int f(alias g)() {
> > return g();
> > }
> > pure int i() {
> > return f!h(); // pure function 'i' cannot call impure function 'f'
> > }
>
>
On Jul 8, 11 00:43, KennyTM~ wrote:
No, I think it's a bug in pure-inference.
pure int h() {
return 1;
}
int f(alias g)() {
return g();
}
pure int i() {
return f!h(); // pure function 'i' cannot call impure function 'f'
}
http://d.puremagic.com/issues/show_bug.cgi?id=6265
On 2011-07-07 04:34, bearophile wrote:
> With the latest beta update this compiles:
>
>
> @property bool empty(T)(in T[] a) pure nothrow {
> return !a.length;
> }
>
> @property ref T front(T)(T[] a) pure nothrow {
> assert(a.length);
> return a[0];
> }
>
> void popFront(A)(ref A a) pure nothrow
On Jul 7, 11 19:34, bearophile wrote:
With the latest beta update this compiles:
@property bool empty(T)(in T[] a) pure nothrow {
return !a.length;
}
@property ref T front(T)(T[] a) pure nothrow {
assert(a.length);
return a[0];
}
void popFront(A)(ref A a) pure nothrow {
as
With the latest beta update this compiles:
@property bool empty(T)(in T[] a) pure nothrow {
return !a.length;
}
@property ref T front(T)(T[] a) pure nothrow {
assert(a.length);
return a[0];
}
void popFront(A)(ref A a) pure nothrow {
assert(a.length);
a = a[1 .. $];
}
struct
On Jul 7, 11 10:02, bearophile wrote:
Jonathan M Davis:
I don't think that it makes any sense to talk about a pure struct or class.
Functions are pure, not types.<
In my opinion, if D wants to solve the issue of pure HOFs, then it has to
decide (or invent) what a pure struct (instance, if y
Jonathan M Davis:
>I don't think that it makes any sense to talk about a pure struct or class.
>Functions are pure, not types.<
In my opinion, if D wants to solve the issue of pure HOFs, then it has to
decide (or invent) what a pure struct (instance, if you want) is.
Bye,
bearophile
On 2011-07-06 16:19, bearophile wrote:
> Jonathan M Davis:
> > I believe that the problem here is essentially what's being argued over
> > in the dmd-beta list right now.
>
> In D a HOF is implemented with a struct or a class. So, what's a pure
> struct/class, generally?
I don't think that it mak
Jonathan M Davis:
> I believe that the problem here is essentially what's being argued over
> in the dmd-beta list right now.
In D a HOF is implemented with a struct or a class. So, what's a pure
struct/class, generally?
Bye,
bearophile
On 2011-07-06 15:42, bearophile wrote:
> I think D eventually needs to allow the creation of pure higher order
> functions, like map, filter, amap (that means array(map(...))).
>
>
> DMD 2.054beta improves the situation with the automatic inference for pure
> and nothrow.
>
I think D eventually needs to allow the creation of pure higher order
functions, like map, filter, amap (that means array(map(...))).
DMD 2.054beta improves the situation with the automatic inference for pure and
nothrow.
(By the way, the changelog says "Add warning about calling pure no
18 matches
Mail list logo