February 02, 2014 Re: D Logo and Slogan | ||||
---|---|---|---|---|
| ||||
Posted in reply to Dicebot | On 02/01/2014 07:44 PM, Dicebot wrote:
> On Saturday, 1 February 2014 at 17:38:44 UTC, Jesse Phillips wrote:
>> alias this = foo;
>>
>> This is new syntax, has some edge cases which fail and intended to
>> replace the old typedef style
>>
>> alias Type NewName;
>>
>> Such that it look more like variable assignment:
>>
>> alias NewName = Type;
>
> This syntax was intended to only be used for normal aliases, not "alias
> this", and was supposed to be removed for latter.
Which is highly nonsensical and basically shows that alias this should have been done as a (or more than one) specially named member instead, as the syntactic pun appears not to be working.
|
February 02, 2014 Re: D Logo and Slogan | ||||
---|---|---|---|---|
| ||||
Posted in reply to Dicebot | On Saturday, 1 February 2014 at 18:44:42 UTC, Dicebot wrote:
> On Saturday, 1 February 2014 at 17:38:44 UTC, Jesse Phillips wrote:
>> alias this = foo;
>>
>> This is new syntax, has some edge cases which fail and intended to replace the old typedef style
>>
>> alias Type NewName;
>>
>> Such that it look more like variable assignment:
>>
>> alias NewName = Type;
>
> This syntax was intended to only be used for normal aliases, not "alias this", and was supposed to be removed for latter.
Pretty sure "alias this" was actually a driving force. E.g
"You should use alias this?"
"How, I added alias this and it didn't compile?"
"The syntax 'alias TheThingToAlias this'"
"So not 'alias this' then."
|
February 02, 2014 Re: D Logo and Slogan | ||||
---|---|---|---|---|
| ||||
Posted in reply to Brian Schott | It was actually removed several releases ago -https://github.com/D-Programming-Language/dmd/pull/1413 |
February 02, 2014 Re: D Logo and Slogan | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jesse Phillips | On 02/02/2014 01:21 AM, Jesse Phillips wrote: > > Pretty sure "alias this" was actually a driving force. E.g > > "You should use alias this?" > > "How, I added alias this and it didn't compile?" > > "The syntax 'alias TheThingToAlias this'" > > "So not 'alias this' then." The syntax was actively removed. https://github.com/D-Programming-Language/dmd/pull/1413 https://github.com/D-Programming-Language/dmd/pull/1685 |
February 02, 2014 Re: D Logo and Slogan | ||||
---|---|---|---|---|
| ||||
Posted in reply to anonymous | On 02/01/2014 10:26 AM, anonymous wrote:
> On Saturday, 1 February 2014 at 18:06:47 UTC, Chris Cain wrote:
>> Asman:
>> Isn't this syntax discouraged/depreciated now?
>
> The word's "deprecated" (de-prec-ate, not de-pre-she-ate).
>
> (Asman actually wrote "depracted".)
New slogan: D'precated
I hope not. :p
Ali
|
February 02, 2014 Re: D Logo and Slogan | ||||
---|---|---|---|---|
| ||||
Posted in reply to Dicebot | On Saturday, 1 February 2014 at 18:44:42 UTC, Dicebot wrote:
> On Saturday, 1 February 2014 at 17:38:44 UTC, Jesse Phillips wrote:
>> alias this = foo;
>>
>> This is new syntax, has some edge cases which fail and intended to replace the old typedef style
>>
>> alias Type NewName;
>>
>> Such that it look more like variable assignment:
>>
>> alias NewName = Type;
>
> This syntax was intended to only be used for normal aliases, not "alias this", and was supposed to be removed for latter.
Because more syntax is always better !
|
February 02, 2014 Re: D Logo and Slogan | ||||
---|---|---|---|---|
| ||||
Posted in reply to Dicebot | On Sunday, 2 February 2014 at 00:25:39 UTC, Dicebot wrote: > It was actually removed several releases ago -https://github.com/D-Programming-Language/dmd/pull/1413 What a mess! I'm almost sorry I brought it up, but I'm glad I did because I was just about to model a 1500 page ARM Cortex-M datasheet using the apparently "old" syntax. So let me get this straight: alias {type} this; // only if using 'this' alias {newType} = {existingType} // all others So, does the language reference here (http://dlang.org/declaration.html#alias) need updating? And do the aliases in object.di here (https://github.com/D-Programming-Language/druntime/blob/master/src/object.di) also need updating? |
February 02, 2014 Re: D Logo and Slogan | ||||
---|---|---|---|---|
| ||||
Posted in reply to anonymous | On Saturday, 1 February 2014 at 18:26:15 UTC, anonymous wrote:
> On Saturday, 1 February 2014 at 18:06:47 UTC, Chris Cain wrote:
>> Asman:
>> Isn't this syntax discouraged/depreciated now?
>
> The word's "deprecated" (de-prec-ate, not de-pre-she-ate).
>
> (Asman actually wrote "depracted".)
Yeah, I actually just right clicked the word for the correction and the i didn't register for whatever reason. Fwiw, I said the word correctly in my head
|
February 02, 2014 Re: D Logo and Slogan | ||||
---|---|---|---|---|
| ||||
Posted in reply to Martin Cejp | On Saturday, 1 February 2014 at 18:32:00 UTC, Martin Cejp wrote:
> On Saturday, 1 February 2014 at 18:06:47 UTC, Chris Cain wrote:
>> I think this whole thread should be our slogan.
>>
>> Mike:
>> alias {D Logo} this;
>> Martin:
>> Outdated syntax. You should use
>> alias this = {D Logo};
>> instead.
>> Asman:
>> Isn't this syntax discouraged/depreciated now?
>>
>> :D
>
> Wait for a few seconds (time for some Garbage Collection), add an 11 kilobytes long mangled function name and a compiler crash, and you get a quite good representation of D :)
Now we're just being mean. :p
D works great for me (it's just sometimes some of these discussions like this get me concerned over mostly trivial things).
|
February 02, 2014 Re: D Logo and Slogan | ||||
---|---|---|---|---|
| ||||
Posted in reply to Mike | On Sunday, 2 February 2014 at 03:23:22 UTC, Mike wrote: > So let me get this straight: > alias {type} this; // only if using 'this' > alias {newType} = {existingType} // all others Yes, but: 1) not {newType} but {newSymbol} - alias does not create new types 2) alias {existingSymbol} {newSymbol} is also legal and not planned for deprecation so far > So, does the language reference here (http://dlang.org/declaration.html#alias) need updating? Yes, looks like those don't mention new syntax. > And do the aliases in object.di here (https://github.com/D-Programming-Language/druntime/blob/master/src/object.di) also need updating? Not necessarily, old syntax is still legal. But in context of consistent style - yes, makes sense. |
Copyright © 1999-2021 by the D Language Foundation