Jump to page: 1 214  
Page
Thread overview
[ ArgumentList ] vs. @( ArgumentList )
Nov 06, 2012
Walter Bright
Nov 06, 2012
David Nadlinger
Nov 06, 2012
deadalnix
Nov 06, 2012
r_m_r
Nov 06, 2012
Benjamin Thaut
Nov 06, 2012
ponce
Nov 06, 2012
Manu
Nov 06, 2012
deadalnix
Nov 07, 2012
Jesse Phillips
Nov 06, 2012
Simen Kjaeraas
Nov 06, 2012
David Nadlinger
Nov 06, 2012
deadalnix
Nov 06, 2012
Jacob Carlborg
Nov 06, 2012
Manu
Nov 06, 2012
Jacob Carlborg
Nov 06, 2012
Manu
Nov 06, 2012
foobar
Nov 06, 2012
Jacob Carlborg
Nov 06, 2012
deadalnix
Nov 06, 2012
David Nadlinger
Nov 07, 2012
Paulo Pinto
Nov 06, 2012
Damian
Nov 06, 2012
mist
Nov 06, 2012
Brian Schott
Nov 06, 2012
Faux Amis
Nov 06, 2012
Simen Kjaeraas
Nov 06, 2012
Manu
Nov 06, 2012
David Nadlinger
Nov 06, 2012
Andrej Mitrovic
Nov 06, 2012
Max Samukha
Nov 06, 2012
Matt Soucy
Nov 06, 2012
captaindet
Nov 06, 2012
H. S. Teoh
Nov 06, 2012
Sönke Ludwig
Nov 06, 2012
Ali Çehreli
Nov 06, 2012
Tavi Cacina
Nov 06, 2012
deadalnix
Nov 06, 2012
Ali Çehreli
Nov 06, 2012
Tavi Cacina
Nov 06, 2012
Walter Bright
Nov 07, 2012
Jacob Carlborg
Nov 06, 2012
Jonathan M Davis
Nov 06, 2012
deadalnix
Nov 06, 2012
Walter Bright
Nov 06, 2012
deadalnix
Nov 06, 2012
Jonathan M Davis
Nov 07, 2012
deadalnix
Nov 07, 2012
Jonathan M Davis
Nov 06, 2012
Andrej Mitrovic
Nov 06, 2012
Andrej Mitrovic
Nov 07, 2012
Jacob Carlborg
Nov 07, 2012
foobar
Nov 07, 2012
Iain Buclaw
Nov 06, 2012
Caligo
Nov 06, 2012
Walter Bright
Nov 06, 2012
Ali Çehreli
Nov 07, 2012
Jacob Carlborg
Nov 07, 2012
deadalnix
Nov 07, 2012
Jacob Carlborg
Nov 06, 2012
alex
Nov 06, 2012
H. S. Teoh
Nov 06, 2012
Artur Skawina
Nov 07, 2012
Nick Sabalausky
Nov 07, 2012
Regan Heath
Nov 07, 2012
Alex_Dovhal
Nov 07, 2012
Jacob Carlborg
Nov 07, 2012
Regan Heath
Nov 07, 2012
H. S. Teoh
Nov 07, 2012
Tobias Pankrath
Nov 07, 2012
deadalnix
Nov 07, 2012
Nick Sabalausky
Nov 06, 2012
Jonathan M Davis
Nov 06, 2012
deadalnix
Nov 06, 2012
David Nadlinger
Nov 07, 2012
kraybourne
Nov 07, 2012
kraybourne
Nov 07, 2012
Jonathan M Davis
Nov 07, 2012
Artur Skawina
Nov 07, 2012
Jakob Ovrum
Nov 07, 2012
Jakob Ovrum
Nov 07, 2012
H. S. Teoh
Nov 07, 2012
John Chapman
Nov 07, 2012
Simen Kjaeraas
Nov 07, 2012
Timon Gehr
Nov 07, 2012
Simen Kjaeraas
Nov 07, 2012
John Chapman
Nov 07, 2012
Simen Kjaeraas
Nov 07, 2012
Walter Bright
Nov 08, 2012
Nick Sabalausky
Nov 08, 2012
Walter Bright
Nov 07, 2012
Walter Bright
Nov 07, 2012
Marco Leise
Nov 07, 2012
John Chapman
Nov 07, 2012
Nathan M. Swan
Nov 07, 2012
deadalnix
Nov 07, 2012
Jacob Carlborg
Nov 08, 2012
Marco Leise
Nov 08, 2012
Jacob Carlborg
Nov 08, 2012
Dmitry Olshansky
Nov 08, 2012
Nick Sabalausky
Nov 08, 2012
Nick Sabalausky
Nov 08, 2012
Dmitry Olshansky
Nov 09, 2012
deadalnix
Nov 07, 2012
Jonas Drewsen
Nov 07, 2012
Jonathan M Davis
Nov 07, 2012
Jacob Carlborg
Nov 07, 2012
Jonas Drewsen
Nov 07, 2012
Walter Bright
Nov 07, 2012
deadalnix
Nov 08, 2012
David Nadlinger
Nov 08, 2012
Andrej Mitrovic
Nov 09, 2012
deadalnix
Nov 09, 2012
Simen Kjaeraas
Nov 08, 2012
Walter Bright
Nov 08, 2012
Sönke Ludwig
Nov 08, 2012
Jacob Carlborg
Nov 09, 2012
deadalnix
Nov 08, 2012
Jonas Drewsen
Nov 08, 2012
Tobias Pankrath
Nov 09, 2012
deadalnix
Nov 10, 2012
Marco Leise
Nov 10, 2012
Sönke Ludwig
Nov 08, 2012
Jacob Carlborg
Nov 07, 2012
Dejan Lekic
Nov 07, 2012
Timon Gehr
Nov 07, 2012
Walter Bright
Nov 07, 2012
Timon Gehr
Nov 07, 2012
Walter Bright
Nov 07, 2012
Timon Gehr
Nov 07, 2012
deadalnix
Nov 08, 2012
Jacob Carlborg
Nov 07, 2012
Paulo Pinto
Nov 07, 2012
F i L
Nov 07, 2012
deadalnix
Nov 07, 2012
nazriel
Nov 08, 2012
deadalnix
November 06, 2012
For User Defined Attributes.

In the north corner we have the current champeeeeon:

-------
[ ArgumentList ]

Pros:
    precedent with C#
    looks nice

Cons:
    not so greppable
    parsing ambiguity with [array literal].func();

------
In the south corner, there's the chaaaaallenger:

@( ArgumentList )

Pros:
    looks like existing @attribute syntax
    no parsing problems

Cons:
    not as nice looking
------

No hitting below the belt! Let the games begin!
November 06, 2012
On Tuesday, 6 November 2012 at 19:18:39 UTC, Walter Bright wrote:
> @( ArgumentList )
>     not as nice looking

Actually, I find it even nicer looking than the other syntax. Combine it with allowing the omission of the parens for a single argument and allowing multiple specifications of it per declaration, and it starts to look a whole lot like the built-in attributes.

David
November 06, 2012
Le 06/11/2012 20:18, Walter Bright a écrit :
> For User Defined Attributes.
>
> In the north corner we have the current champeeeeon:
>
> -------
> [ ArgumentList ]
>
> Pros:
> precedent with C#
> looks nice
>
> Cons:
> not so greppable
> parsing ambiguity with [array literal].func();
>
> ------
> In the south corner, there's the chaaaaallenger:
>
> @( ArgumentList )
>
> Pros:
> looks like existing @attribute syntax
> no parsing problems
>

Look like what is done in Java, python and PHP.

> Cons:
> not as nice looking
> ------
>
> No hitting below the belt! Let the games begin!

BTW, I'm all for @argument @argument @argument rather than @(argumentlist)
November 06, 2012
@( ArgumentList ) FTW :D

On Tuesday, 6 November 2012 at 19:18:39 UTC, Walter Bright wrote:
> For User Defined Attributes.
>
> In the north corner we have the current champeeeeon:
>
> -------
> [ ArgumentList ]
>
> Pros:
>     precedent with C#
>     looks nice
>
> Cons:
>     not so greppable
>     parsing ambiguity with [array literal].func();
>
> ------
> In the south corner, there's the chaaaaallenger:
>
> @( ArgumentList )
>
> Pros:
>     looks like existing @attribute syntax
>     no parsing problems
>
> Cons:
>     not as nice looking
> ------
>
> No hitting below the belt! Let the games begin!


November 06, 2012
Am 06.11.2012 20:18, schrieb Walter Bright:
> For User Defined Attributes.
>
> In the north corner we have the current champeeeeon:
>
> -------
> [ ArgumentList ]
>
> Pros:
>      precedent with C#
>      looks nice
>
> Cons:
>      not so greppable
>      parsing ambiguity with [array literal].func();
>
> ------
> In the south corner, there's the chaaaaallenger:
>
> @( ArgumentList )
>
> Pros:
>      looks like existing @attribute syntax
>      no parsing problems
>
> Cons:
>      not as nice looking
> ------
>
> No hitting below the belt! Let the games begin!

I think @( ArgumentList ) would be more consistent with what D already has, but my vot still goes for [ ArgumentList ] because personally I find that @'s make the code look "ugly". There are other languages where the '@' is only used for language features you shouldn't be using a lot.

Kind Regards
Benjamin Thaut
November 06, 2012
I like @(ArgumentList) better for stated reason: it looks like
existing @attributes.
November 06, 2012
On 2012-11-06, 20:18, Walter Bright wrote:

> For User Defined Attributes.
>
> In the north corner we have the current champeeeeon:
>
> -------
> [ ArgumentList ]
>
> Pros:
>      precedent with C#
>      looks nice
>
> Cons:
>      not so greppable
>      parsing ambiguity with [array literal].func();
>
> ------
> In the south corner, there's the chaaaaallenger:
>
> @( ArgumentList )
>
> Pros:
>      looks like existing @attribute syntax
>      no parsing problems
>
> Cons:
>      not as nice looking
> ------
>
> No hitting below the belt! Let the games begin!

@( ArgumentList ).

-- 
Simen
November 06, 2012
On Tuesday, 6 November 2012 at 19:18:39 UTC, Walter Bright wrote:
> [ ArgumentList ]
>
> Pros:
>     precedent with C#

I guess »precedent with Java« should be added to the respective @() list then.

David
November 06, 2012
On 2012-11-06 20:18, Walter Bright wrote:
> For User Defined Attributes.
>
> In the north corner we have the current champeeeeon:
>
> -------
> [ ArgumentList ]
>
> Pros:
>      precedent with C#
>      looks nice
>
> Cons:
>      not so greppable
>      parsing ambiguity with [array literal].func();
>
> ------
> In the south corner, there's the chaaaaallenger:
>
> @( ArgumentList )
>
> Pros:
>      looks like existing @attribute syntax
>      no parsing problems
>
> Cons:
>      not as nice looking
> ------
>
> No hitting below the belt! Let the games begin!

I vote for @( ArgumentList ). If this is syntax chosen I also hope @attribute will be legal as well.

-- 
/Jacob Carlborg
November 06, 2012
I actually quite liked Tristan's argument.

[attr, attr2] feels more like what it is, an annotation. It does nothing,
has no effect on the declaration on its own.
the @attr syntax looks like existing attributes, and with that kinda comes
the presumption that they actually DO something, affect the code generated
in some way.
For that reason, I buy the argument that [attrs...] being visually distinct
makes more sense, more like what it is.

Perhaps it should be termed 'annotation' rather than 'attribute'?


On 6 November 2012 21:38, ponce <spam@spam.org> wrote:

> I like @(ArgumentList) better for stated reason: it looks like
> existing @attributes.
>


« First   ‹ Prev
1 2 3 4 5 6 7 8 9 10 11