November 06, 2012
On 11/06/2012 11:18 AM, Walter Bright wrote:
> For User Defined Attributes.

@() with optional ().

Ali
November 06, 2012
On Tuesday, 6 November 2012 at 19:18:39 UTC, Walter Bright wrote:
> No hitting below the belt! Let the games begin!

@


November 06, 2012
I agree with David and deadalnix agument wise, so:

@(attriblist) or @attrib1 @attrib2

with the hope that this syntax is extensible enough to make it possible to implement something like @safe or @noheap as library functionality at some day.
November 06, 2012
Le 06/11/2012 22:07, Tavi Cacina a écrit :
> On Tuesday, 6 November 2012 at 19:18:39 UTC, Walter Bright wrote:
>> No hitting below the belt! Let the games begin!
>
> @
>
>

Who will make that even shorter ?
November 06, 2012
On 11/06/2012 01:19 PM, deadalnix wrote:
> Le 06/11/2012 22:07, Tavi Cacina a écrit :
>> On Tuesday, 6 November 2012 at 19:18:39 UTC, Walter Bright wrote:
>>> No hitting below the belt! Let the games begin!
>>
>> @
>>
>>
>
> Who will make that even shorter ?

Not shorter but definitely more in line with C and C++ heritage:

    static() with optional ()

Ali

November 06, 2012
On Tuesday, 6 November 2012 at 20:01:27 UTC, Jacob Carlborg wrote:
> On 2012-11-06 20:52, Manu wrote:
>> I'd like to re-enforce the consideration that @attribute() makes it
>> looks like they affect the code generation somehow... they're really
>> just annotations.
>
> I still like the syntax.

I'd also like to add that the OP argument is false.
Sure, the attributes themselves are just meta-data and you can use them for purely informative purposes (to annotate with documentation, author names, versions, license, etc..) but more commonly attributes are intended to be introspected on at CT or RT and used to *indirectly cause some processing*.

The end result is the same and user defined attributes should be consistent with built-in ones.
Syntax wise, I agree the C# version is /slightly/ more pleasant to the eye than the Java one but given the possible grammar ambiguities and the consistency with buit-ins, @(attributes) win by a landslide.
November 06, 2012
On Tuesday, November 06, 2012 11:18:34 Walter Bright wrote:
> No hitting below the belt! Let the games begin!

Definitely @(ArgumentList). It fits with what other languages do, and it matches what we're already doing for attributes. I also think that's what pretty much everyone was figuring would be used for user-defined attributes. The only major problem would be if @ArgumentList is allowed when there's only a single argument, then code could break when new built-in attributes are added.

- Jonathan M Davis
November 06, 2012
On Tue, Nov 6, 2012 at 1:18 PM, Walter Bright <newshound2@digitalmars.com> wrote:
>
> No hitting below the belt! Let the games begin!

If those are our only choices, then I vote for @( ArgumentList ).

Otherwise, I think these look better:

[: ArgumentList :]

or

|: ArgumentList :|
November 06, 2012
I must add that watching the mind game from Chris http://forum.dlang.org/post/puseurlcwbgvigwkdowu@forum.dlang.org the [] is quite appealing. The @ is perfect if one needs just a singular @tag. Is having both not an option :-)
November 06, 2012
On 11/6/2012 1:07 PM, Tavi Cacina wrote:
> On Tuesday, 6 November 2012 at 19:18:39 UTC, Walter Bright wrote:
>> No hitting below the belt! Let the games begin!
>
> @


2 penalty points for that one!
1 2 3 4 5 6 7 8 9 10 11 12 13 14
Top | Discussion index | About this forum | D home