On Friday, 25 November 2016 at 17:21:52 UTC, Nick Treleaven wrote:
I've started documenting it now, will post a PR soon.
https://github.com/dlang/dlang.org/pull/1519
On Thursday, 24 November 2016 at 00:35:39 UTC, TheGag96 wrote:
The thing that gets me more is "return" as a function
attribute. I see it under "MemberFunctionAttribute" in the
grammar but I can't find an explanation for its use anywhere...
I've started documenting it now, will post a PR soon.
On Thursday, November 24, 2016 00:35:39 TheGag96 via Digitalmars-d-learn
wrote:
> On Tuesday, 22 November 2016 at 13:06:27 UTC, Nordlöw wrote:
> > On Monday, 21 November 2016 at 20:04:51 UTC, Ali Çehreli wrote:
> >> mixin template RvalueRef()// <-- DOES NOT TAKE A PARAMETER
> >> ANY MORE
> >>
On Thursday, 24 November 2016 at 00:35:39 UTC, TheGag96 wrote:
The thing that gets me more is "return" as a function
attribute. I see it under "MemberFunctionAttribute" in the
grammar but I can't find an explanation for its use anywhere...
YOU ARE NOT SUPPOSED TO KNOW THIS. DON'T LIVE YOUR PLA
On Tuesday, 22 November 2016 at 13:06:27 UTC, Nordlöw wrote:
On Monday, 21 November 2016 at 20:04:51 UTC, Ali Çehreli wrote:
mixin template RvalueRef()// <-- DOES NOT TAKE A PARAMETER
ANY MORE
{
alias T = typeof(this);
static assert (is(T == struct));
@nogc @safe
ref const(
On Tuesday, 22 November 2016 at 22:03:14 UTC, Satoshi wrote:
or I have simple class
class View {
this(Rectangle frame) {...}
this(float, float, float, float) { ... }
this(Point, Size) { ... }
}
then struct Point, Size and Rectangle (Point, Size)
now I need to write 2 overloads for View class t
On Tuesday, 22 November 2016 at 16:05:35 UTC, Satoshi wrote:
Sorry, but D seems to be worse and worse day by day. This
should be resolved by language and not doing it by template
function.
Same thing should be applied for maybe monad and tuples.
I'm reminded of trying to follow the rules and
On Tuesday, 22 November 2016 at 16:57:28 UTC, kink wrote:
I hate this 'idiom' too (just a clumsy workaround for something
that should work out of the box), but the non-bindability of
rvalues to ref params and the associated dispute is veeery old,
nothing new, so I don't agree that the languag
or I have simple class
class View {
this(Rectangle frame) {...}
this(float, float, float, float) { ... }
this(Point, Size) { ... }
}
then struct Point, Size and Rectangle (Point, Size)
now I need to write 2 overloads for View class taking 4 floats or
(Point, Size) and this must do in every des
On Tuesday, 22 November 2016 at 19:16:56 UTC, Ali Çehreli wrote:
On 11/22/2016 08:05 AM, Satoshi wrote:
I don't have extensive experience with other languages. In
fact, the only other languages that I can claim proficiency are
C and C++. (I also know Python just enough to find it
incredible
On 11/22/2016 08:05 AM, Satoshi wrote:
> Sorry, but D seems to be worse and worse day by day.
I don't have extensive experience with other languages. In fact, the
only other languages that I can claim proficiency are C and C++. (I also
know Python just enough to find it incredible how it's use
On Tuesday, 22 November 2016 at 16:05:35 UTC, Satoshi wrote:
Sorry, but D seems to be worse and worse day by day.
This should be resolved by language and not doing it by
template function.
I hate this 'idiom' too (just a clumsy workaround for something
that should work out of the box), but th
On Monday, 21 November 2016 at 20:04:51 UTC, Ali Çehreli wrote:
First, a reminder that we have this great resource of D idioms:
https://p0nce.github.io/d-idioms/#Rvalue-references:-Understanding-auto-ref-and-then-not-using-it
The link above has an idiom of mixing in a byRef() member
function
On Monday, 21 November 2016 at 20:04:51 UTC, Ali Çehreli wrote:
Let me know if it's not the equivalent of the original.
Ali
I've changed the idiom, thanks. The place to discuss this is the
d-idioms bugtracker, else I would have skipped this message.
On Tuesday, 22 November 2016 at 13:06:27 UTC, Nordlöw wrote:
On Monday, 21 November 2016 at 20:04:51 UTC, Ali Çehreli wrote:
mixin template RvalueRef()// <-- DOES NOT TAKE A PARAMETER
ANY MORE
{
alias T = typeof(this);
static assert (is(T == struct));
@nogc @safe
ref const(
On Monday, 21 November 2016 at 20:04:51 UTC, Ali Çehreli wrote:
ref const(T) byRef() const pure nothrow return
Add when DIP-1000 has been implemented into compiler this should
be `scope`-qualified aswell, right?
On 11/22/2016 05:06 AM, Nordlöw wrote:
On Monday, 21 November 2016 at 20:04:51 UTC, Ali Çehreli wrote:
mixin template RvalueRef()// <-- DOES NOT TAKE A PARAMETER ANY MORE
{
alias T = typeof(this);
static assert (is(T == struct));
@nogc @safe
ref const(T) byRef() const pure n
On Monday, 21 November 2016 at 20:04:51 UTC, Ali Çehreli wrote:
mixin template RvalueRef()// <-- DOES NOT TAKE A PARAMETER
ANY MORE
{
alias T = typeof(this);
static assert (is(T == struct));
@nogc @safe
ref const(T) byRef() const pure nothrow return
Why do you need to qual
On Monday, 21 November 2016 at 20:04:51 UTC, Ali Çehreli wrote:
Let me know if it's not the equivalent of the original.
Ali
Nice. What about putting this in a druntime or phobos PR, making
it standardized?
First, a reminder that we have this great resource of D idioms:
https://p0nce.github.io/d-idioms/#Rvalue-references:-Understanding-auto-ref-and-then-not-using-it
The link above has an idiom of mixing in a byRef() member function to a
struct. I think I've simplified the template by moving typeo
20 matches
Mail list logo