Thread overview | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
June 23, 2014 Time to rename "D" to "@D" !? | ||||
---|---|---|---|---|
| ||||
The @ symbols used on all those attributes like @nogc @nothrow @pure @safe make the D code look ugly. If possible, please get rid of those @ symbols. The attributes look good without the "@" symbols. |
June 23, 2014 Re: Time to rename "D" to "@D" !? | ||||
---|---|---|---|---|
| ||||
Posted in reply to John | On Monday, 23 June 2014 at 17:30:19 UTC, John wrote:
> The @ symbols used on all those attributes like @nogc @nothrow @pure @safe make the D code look ugly.
>
> If possible, please get rid of those @ symbols. The attributes look good without the "@" symbols.
I agree that it looks ugly and is a lot of visual noise, similar to all the angle brackets that some complain about with C++ templates. However, I'm not sure it can be remedied this late in the game.
|
June 23, 2014 Re: Time to rename "D" to "@D" !? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Joakim | On Monday, 23 June 2014 at 17:50:10 UTC, Joakim wrote:
>> The @ symbols used on all those attributes like @nogc @nothrow @pure @safe make the D code look ugly.
If we want this change we probably have to make them deprecated a couple of DMD versions before we active the new keywords which may break existing code.
|
June 23, 2014 Re: Time to rename "D" to "@D" !? | ||||
---|---|---|---|---|
| ||||
Posted in reply to John | Plaese no. |
June 23, 2014 Re: Time to rename "D" to "@D" !? | ||||
---|---|---|---|---|
| ||||
Posted in reply to John | Funny enough two of the attributes you mentioned (pure and nothrow) don't have an @ on them. Maybe I'm strange, but I don't see any problem with the @, and would actually like to see some of the other attributes (including pure and nothrow) adopt them, for consistancy and to free up names. Surely you don't think "safe" should be a keyword? Or "trusted" or "system"? |
June 23, 2014 Re: Time to rename "D" to "@D" !? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Chris Nicholson-Sauls | On Monday, 23 June 2014 at 19:37:49 UTC, Chris Nicholson-Sauls wrote: > Funny enough two of the attributes you mentioned (pure and nothrow) don't have an @ on them. Maybe I'm strange, but I don't see any problem with the @, and would actually like to see some of the other attributes (including pure and nothrow) adopt them, for consistancy and to free up names. Surely you don't think "safe" should be a keyword? Or "trusted" or "system"? All are having the @ added: http://wiki.dlang.org/DIP64 |
June 23, 2014 Re: Time to rename "D" to "@D" !? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Gary Willoughby | On Monday, 23 June 2014 at 20:08:41 UTC, Gary Willoughby wrote:
> All are having the @ added: http://wiki.dlang.org/DIP64
This hasn't been decided on. It's just a proposal right now.
|
June 23, 2014 Re: Time to rename "D" to "@D" !? | ||||
---|---|---|---|---|
| ||||
Posted in reply to John | On Monday, June 23, 2014 17:30:18 John via Digitalmars-d wrote:
> The @ symbols used on all those attributes like @nogc @nothrow @pure @safe make the D code look ugly.
>
> If possible, please get rid of those @ symbols. The attributes look good without the "@" symbols.
It would be very cool if we could remove @ from all of the built-in attributes, but the whole reason that they have them in the first place is because it was decided that we didn't want to add new keywords - and that was several years ago when D had a smaller user base. So, I really don't see it changing at this point. If anything, we might go the _other_ way and add @ onto the attributes that don't have it in order to make them more consistent (though I hope that we don't do that, because it's ugly and more verbose).
I sympathize with you, but I think that we're stuck at this point.
- Jonathan M Davis
|
June 23, 2014 Re: Time to rename "D" to "@D" !? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jonathan M Davis | On Monday, 23 June 2014 at 20:34:59 UTC, Jonathan M Davis via Digitalmars-d wrote:
> It would be very cool if we could remove @ from all of the built-in
> attributes, but the whole reason that they have them in the first place is
> because it was decided that we didn't want to add new keywords - and that was
> several years ago when D had a smaller user base. So, I really don't see it
> changing at this point. If anything, we might go the _other_ way and add @
> onto the attributes that don't have it in order to make them more consistent
> (though I hope that we don't do that, because it's ugly and more verbose).
People (I've talked to) seem to like Python decorators and Java annotations, and they have mandatory "@" characters.
I like the "@" because it helps me (and my editor) distinguish between words that *define* a computation (return type, parameters, etc.) and words that *describe* a computation (attributes).
|
June 23, 2014 Re: Time to rename "D" to "@D" !? | ||||
---|---|---|---|---|
| ||||
Posted in reply to John | On Monday, 23 June 2014 at 17:30:19 UTC, John wrote:
> The @ symbols used on all those attributes like @nogc @nothrow @pure @safe make the D code look ugly.
>
> If possible, please get rid of those @ symbols. The attributes look good without the "@" symbols.
Give up this idea, right now.
Grammatically it would break all the code using identifiers such as 'safe'...
I think it's just not possible. interesting example:
---------------------------
import std.stdio;
@safe int safe()
{
auto i = 8;
return i;
}
void main(string ars[])
{
writeln(safe);
}
---------------------------
What you want is just impossible...
|
Copyright © 1999-2021 by the D Language Foundation