Re: DIP6

2009-10-15 Thread Kagamin
Kagamin Wrote: > Ary Borenszweig Wrote: > > > > On a US layout -- > > > @ is Shift+2 > > > but [ and ] are single keystrokes. > > > > > > --bb > > > > Ah, two keys. I thought two chars. But I use the pinky finger to do the > > shift, isn't that less that a full blown finger to do [ or ]? > >

Re: DIP6

2009-10-15 Thread Kagamin
Ary Borenszweig Wrote: > > On a US layout -- > > @ is Shift+2 > > but [ and ] are single keystrokes. > > > > --bb > > Ah, two keys. I thought two chars. But I use the pinky finger to do the > shift, isn't that less that a full blown finger to do [ or ]? I thought, I'll break my fingers trying

Re: DIP6

2009-10-14 Thread Chris Nicholson-Sauls
Ary Borenszweig wrote: Bill Baxter wrote: On Wed, Oct 14, 2009 at 5:47 AM, Ary Borenszweig wrote: Kagamin wrote: http://www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP6 Java's syntax has the advantage of having to type less when the annotation has no arguments: @annotati

Re: DIP6

2009-10-14 Thread Ary Borenszweig
Bill Baxter wrote: On Wed, Oct 14, 2009 at 5:47 AM, Ary Borenszweig wrote: Kagamin wrote: http://www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP6 Java's syntax has the advantage of having to type less when the annotation has no arguments: @annotation vs. [annotation]. In both

Re: DIP6

2009-10-14 Thread Kagamin
Frank Benoit Wrote: > > And people here wonder why I custom order my laptops and keyboards to > > get native US layouts.. > > > > Jeremie > > Hehe, same here in Germany In non-latin keyboard layouts there's no latin symbols at all. Feel the difference.

Re: DIP6

2009-10-14 Thread Frank Benoit
Jeremie Pelletier schrieb: > Back when I started programming on a french canadian layout, most of > these symbols were located at crazy places, like ? is shift-6, [], {}, > <> are all found using right-alt + one of the many keys close to enter, > which are used for accents, really annoying. Even th

Re: DIP6

2009-10-14 Thread Jeremie Pelletier
Bill Baxter wrote: On Wed, Oct 14, 2009 at 5:47 AM, Ary Borenszweig wrote: Kagamin wrote: http://www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP6 Java's syntax has the advantage of having to type less when the annotation has no arguments: @annotation vs. [annotation]. In both

Re: DIP6

2009-10-14 Thread Bill Baxter
On Wed, Oct 14, 2009 at 5:47 AM, Ary Borenszweig wrote: > Kagamin wrote: >> >> http://www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP6 >> >>> Java's syntax has the advantage of having to type less when the >>> annotation has no arguments: @anno

Re: DIP6

2009-10-14 Thread Ary Borenszweig
Kagamin wrote: http://www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP6 Java's syntax has the advantage of having to type less when the annotation has no arguments: @annotation vs. [annotation]. In both cases you have a two-keys overhead. No, why?

DIP6

2009-10-14 Thread Kagamin
http://www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP6 >Java's syntax has the advantage of having to type less when the annotation has >no arguments: @annotation vs. [annotation]. In both cases you have a two-keys overhead.

Re: DIP6: Attributes

2009-08-05 Thread Don
Jacob Carlborg wrote: On 8/4/09 18:55, Steven Schveighoffer wrote: On Tue, 04 Aug 2009 12:23:41 -0400, Andrei Alexandrescu wrote: Steven Schveighoffer wrote: On Tue, 04 Aug 2009 09:45:51 -0400, grauzone wrote: Steven Schveighoffer wrote: don't think it's worth adding them until we can ha

Re: DIP6: Attributes

2009-08-05 Thread Denis Koroskin
On Wed, 05 Aug 2009 07:20:38 +0400, Benji Smith wrote: Frank Benoit wrote: Andrei Alexandrescu schrieb: Ary Borenszweig wrote: call!(foo)(5, "hello") with varaidic args? Well some don't like to need to remember the order of arguments. Andrei Assigning the argument by name instead of o

Re: DIP6: Attributes

2009-08-05 Thread Kagamin
Steven Schveighoffer Wrote: > What I'd like to see is something like this possible: > > void foo (int timeout, string bar, float f = 4.0); > > void foo(int timeout); > > call!(foo)("timeout=5,bar=\"hello\""); > > Taking into account the default value of f, what the parameters are named, > an

Re: DIP6: Attributes

2009-08-04 Thread Benji Smith
Frank Benoit wrote: Andrei Alexandrescu schrieb: Ary Borenszweig wrote: call!(foo)(5, "hello") with varaidic args? Well some don't like to need to remember the order of arguments. Andrei Assigning the argument by name instead of order has two other benefits, i can think of... 1. on the cal

Re: DIP6: Attributes

2009-08-04 Thread Steven Schveighoffer
On Tue, 04 Aug 2009 17:20:53 -0400, Rainer Deyke wrote: Steven Schveighoffer wrote: On Tue, 04 Aug 2009 15:56:16 -0400, Ary Borenszweig wrote: foo(timeout=5, bar="100") It could also be accomplished via a fully implemented reflection library, which is my side topic for this thread branch

Re: DIP6: Attributes

2009-08-04 Thread Jacob Carlborg
On 8/4/09 19:20, Andrei Alexandrescu wrote: Steven Schveighoffer wrote: On Tue, 04 Aug 2009 12:23:41 -0400, Andrei Alexandrescu wrote: Steven Schveighoffer wrote: On Tue, 04 Aug 2009 09:45:51 -0400, grauzone wrote: Steven Schveighoffer wrote: don't think it's worth adding them until we c

Re: DIP6: Attributes

2009-08-04 Thread Jacob Carlborg
On 8/5/09 00:22, Jacob Carlborg wrote: On 8/4/09 18:55, Steven Schveighoffer wrote: On Tue, 04 Aug 2009 12:23:41 -0400, Andrei Alexandrescu wrote: Steven Schveighoffer wrote: On Tue, 04 Aug 2009 09:45:51 -0400, grauzone wrote: Steven Schveighoffer wrote: don't think it's worth adding the

Re: DIP6: Attributes

2009-08-04 Thread Jacob Carlborg
On 8/4/09 18:55, Steven Schveighoffer wrote: On Tue, 04 Aug 2009 12:23:41 -0400, Andrei Alexandrescu wrote: Steven Schveighoffer wrote: On Tue, 04 Aug 2009 09:45:51 -0400, grauzone wrote: Steven Schveighoffer wrote: don't think it's worth adding them until we can have full reflection capa

Re: DIP6: Attributes

2009-08-04 Thread John C
Steven Schveighoffer wrote: For instance you could do this exact thing in C#, even though C# doesn't support named parameters. But they're coming: http://msdn.microsoft.com/en-us/library/dd264739(VS.100).aspx

Re: DIP6: Attributes

2009-08-04 Thread Rainer Deyke
Steven Schveighoffer wrote: > On Tue, 04 Aug 2009 15:56:16 -0400, Ary Borenszweig > wrote: >> foo(timeout=5, bar="100") > It could also be accomplished via a fully implemented reflection > library, which is my side topic for this thread branch :P No. The names of positional arguments are an impl

Re: DIP6: Attributes

2009-08-04 Thread Ary Borenszweig
Steven Schveighoffer wrote: On Tue, 04 Aug 2009 15:56:16 -0400, Ary Borenszweig wrote: Andrei Alexandrescu wrote: Well some don't like to need to remember the order of arguments. But that's a way totally different thing discussed here. First you need to introduce argument names when invo

Re: DIP6: Attributes

2009-08-04 Thread Steven Schveighoffer
On Tue, 04 Aug 2009 15:56:16 -0400, Ary Borenszweig wrote: Andrei Alexandrescu wrote: Well some don't like to need to remember the order of arguments. But that's a way totally different thing discussed here. First you need to introduce argument names when invoking a function. void foo(i

Re: DIP6: Attributes

2009-08-04 Thread Ary Borenszweig
Ary Borenszweig wrote: Andrei Alexandrescu wrote: Ary Borenszweig wrote: Andrei Alexandrescu wrote: Steven Schveighoffer wrote: On Tue, 04 Aug 2009 12:23:41 -0400, Andrei Alexandrescu wrote: Steven Schveighoffer wrote: On Tue, 04 Aug 2009 09:45:51 -0400, grauzone wrote: Steven Schvei

Re: DIP6: Attributes

2009-08-04 Thread Ary Borenszweig
Andrei Alexandrescu wrote: Ary Borenszweig wrote: Andrei Alexandrescu wrote: Steven Schveighoffer wrote: On Tue, 04 Aug 2009 12:23:41 -0400, Andrei Alexandrescu wrote: Steven Schveighoffer wrote: On Tue, 04 Aug 2009 09:45:51 -0400, grauzone wrote: Steven Schveighoffer wrote: don't thi

Re: DIP6: Attributes

2009-08-04 Thread Frank Benoit
Andrei Alexandrescu schrieb: > Ary Borenszweig wrote: >> call!(foo)(5, "hello") >> >> with varaidic args? > > Well some don't like to need to remember the order of arguments. > > Andrei Assigning the argument by name instead of order has two other benefits, i can think of... 1. on the call side,

Re: DIP6: Attributes

2009-08-04 Thread Andrei Alexandrescu
Ary Borenszweig wrote: Andrei Alexandrescu wrote: Steven Schveighoffer wrote: On Tue, 04 Aug 2009 12:23:41 -0400, Andrei Alexandrescu wrote: Steven Schveighoffer wrote: On Tue, 04 Aug 2009 09:45:51 -0400, grauzone wrote: Steven Schveighoffer wrote: don't think it's worth adding them unt

Re: DIP6: Attributes

2009-08-04 Thread Steven Schveighoffer
On Tue, 04 Aug 2009 14:46:34 -0400, Ary Borenszweig wrote: Steven Schveighoffer wrote: On Tue, 04 Aug 2009 13:44:46 -0400, Ary Borenszweig wrote: Andrei Alexandrescu wrote: Steven Schveighoffer wrote: What I'd like to see is something like this possible: void foo (int timeout, string

Re: DIP6: Attributes

2009-08-04 Thread Ary Borenszweig
Steven Schveighoffer wrote: On Tue, 04 Aug 2009 13:44:46 -0400, Ary Borenszweig wrote: Andrei Alexandrescu wrote: Steven Schveighoffer wrote: What I'd like to see is something like this possible: void foo (int timeout, string bar, float f = 4.0); void foo(int timeout); call!(foo)("timeou

Re: DIP6: Attributes

2009-08-04 Thread Steven Schveighoffer
On Tue, 04 Aug 2009 13:44:46 -0400, Ary Borenszweig wrote: Andrei Alexandrescu wrote: Steven Schveighoffer wrote: What I'd like to see is something like this possible: void foo (int timeout, string bar, float f = 4.0); void foo(int timeout); call!(foo)("timeout=5,bar=\"hello\""); Taking

Re: DIP6: Attributes

2009-08-04 Thread Ary Borenszweig
Andrei Alexandrescu wrote: Steven Schveighoffer wrote: On Tue, 04 Aug 2009 12:23:41 -0400, Andrei Alexandrescu wrote: Steven Schveighoffer wrote: On Tue, 04 Aug 2009 09:45:51 -0400, grauzone wrote: Steven Schveighoffer wrote: don't think it's worth adding them until we can have full ref

Re: DIP6: Attributes

2009-08-04 Thread Andrei Alexandrescu
Steven Schveighoffer wrote: On Tue, 04 Aug 2009 12:23:41 -0400, Andrei Alexandrescu wrote: Steven Schveighoffer wrote: On Tue, 04 Aug 2009 09:45:51 -0400, grauzone wrote: Steven Schveighoffer wrote: don't think it's worth adding them until we can have full reflection capabilities so we c

Re: DIP6: Attributes

2009-08-04 Thread Steven Schveighoffer
On Tue, 04 Aug 2009 12:23:41 -0400, Andrei Alexandrescu wrote: Steven Schveighoffer wrote: On Tue, 04 Aug 2009 09:45:51 -0400, grauzone wrote: Steven Schveighoffer wrote: don't think it's worth adding them until we can have full reflection capabilities so we can get at elements of code

Re: DIP6: Attributes

2009-08-04 Thread Andrei Alexandrescu
Steven Schveighoffer wrote: On Tue, 04 Aug 2009 09:45:51 -0400, grauzone wrote: Steven Schveighoffer wrote: don't think it's worth adding them until we can have full reflection capabilities so we can get at elements of code and therefore get the annotations associated with it. I see much mo

Re: DIP6: Attributes

2009-08-04 Thread Ary Borenszweig
Sergey Gromov wrote: Tue, 04 Aug 2009 11:58:27 -0300, Ary Borenszweig wrote: Sergey Gromov wrote: Tue, 04 Aug 2009 22:46:22 +1000, Daniel Keep wrote: Sergey Gromov wrote: Tue, 04 Aug 2009 17:22:50 +1000, Daniel Keep wrote: Don wrote: ... A question: in C#/Java, can you have annotations

Re: DIP6: Attributes

2009-08-04 Thread Sergey Gromov
Tue, 04 Aug 2009 11:58:27 -0300, Ary Borenszweig wrote: > Sergey Gromov wrote: >> Tue, 04 Aug 2009 22:46:22 +1000, Daniel Keep wrote: >> >>> Sergey Gromov wrote: Tue, 04 Aug 2009 17:22:50 +1000, Daniel Keep wrote: > Don wrote: >> ... >> >> A question: in C#/Java, can you

Re: DIP6: Attributes

2009-08-04 Thread Sergey Gromov
Tue, 04 Aug 2009 22:46:22 +1000, Daniel Keep wrote: > Sergey Gromov wrote: >> Tue, 04 Aug 2009 17:22:50 +1000, Daniel Keep wrote: >> >>> Don wrote: ... A question: in C#/Java, can you have annotations on function pointer and delegate declarations? void foo( int deleg

Re: DIP6: Attributes

2009-08-04 Thread Ary Borenszweig
Sergey Gromov wrote: Tue, 04 Aug 2009 22:46:22 +1000, Daniel Keep wrote: Sergey Gromov wrote: Tue, 04 Aug 2009 17:22:50 +1000, Daniel Keep wrote: Don wrote: ... A question: in C#/Java, can you have annotations on function pointer and delegate declarations? void foo( int delegate(int) pure

Re: DIP6: Attributes

2009-08-04 Thread Steven Schveighoffer
On Tue, 04 Aug 2009 09:45:51 -0400, grauzone wrote: Steven Schveighoffer wrote: don't think it's worth adding them until we can have full reflection capabilities so we can get at elements of code and therefore get the annotations associated with it. I see much more usefulness for annotat

Re: DIP6: Attributes

2009-08-04 Thread grauzone
Kagamin wrote: grauzone Wrote: inheritance? You want to inherit annotations? What for? Backward compatibility: obtain annotation cast it, work with it, then later change its type. Annotations will be used by reflection, so classinfo will be useful. Code can do that at compiletime. No nee

Re: DIP6: Attributes

2009-08-04 Thread grauzone
Steven Schveighoffer wrote: For the record, I'm not really keen on using annotations for *everything* as some people have suggested. They have good uses, but I Me neither, but I think they'd be a worthy feature. Of course, there are far more pressing issues, but if Walter has time to introdu

Re: DIP6: Attributes

2009-08-04 Thread Steven Schveighoffer
On Tue, 04 Aug 2009 03:03:12 -0400, Don wrote: A question: in C#/Java, can you have annotations on function pointer and delegate declarations? void foo( int delegate(int) pure dg) { ... } What would this look like with annotations? (The underlying question is, how do annotations interact

Re: DIP6: Attributes

2009-08-04 Thread Daniel Keep
Sergey Gromov wrote: > Tue, 04 Aug 2009 17:22:50 +1000, Daniel Keep wrote: > >> Don wrote: >>> ... >>> >>> A question: in C#/Java, can you have annotations on function pointer and >>> delegate declarations? >>> >>> void foo( int delegate(int) pure dg) { >>> ... >>> } >>> What would this look l

Re: DIP6: Attributes

2009-08-04 Thread Sergey Gromov
Tue, 04 Aug 2009 17:22:50 +1000, Daniel Keep wrote: > Don wrote: >> ... >> >> A question: in C#/Java, can you have annotations on function pointer and >> delegate declarations? >> >> void foo( int delegate(int) pure dg) { >> ... >> } >> What would this look like with annotations? > > Well, Ja

Re: DIP6: Attributes

2009-08-04 Thread Ary Borenszweig
Don escribió: Steven Schveighoffer wrote: On Mon, 03 Aug 2009 11:42:33 -0400, Ary Borenszweig wrote: Don wrote: Ary Borenszweig wrote: Don escribió: grauzone wrote: Don wrote: Ary Borenszweig wrote: http://www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP6 This looks like a

Re: DIP6: Attributes

2009-08-04 Thread Don
Kagamin wrote: Don Wrote: To answer Don's point, there is nothing saying that the compiler can't read attributes and change its behavior. Of course, those would have to be builtin attributes. Yes, but then they're just keywords, with an @ in front. You'd just be kidding yourself if you think

Re: DIP6: Attributes

2009-08-04 Thread Kagamin
Daniel Keep Wrote: > Which one works right now and doesn't require you first spend at least a > year convincing Walter that it's useful, then convincing him it's > necessary As far as I see, necessity is not questioned. It may be only of low priority or something like that.

Re: DIP6: Attributes

2009-08-04 Thread Kagamin
Don Wrote: > > To answer Don's point, there is nothing saying that the compiler can't > > read attributes and change its behavior. Of course, those would have to > > be builtin attributes. > > Yes, but then they're just keywords, with an @ in front. You'd just be > kidding yourself if you thi

Re: DIP6: Attributes

2009-08-04 Thread Kagamin
Don Wrote: > > Annotations are useful in many ways, but without full reflection > > capabilities, they are restricted to things that can read them via > > source code, and so they are no better than comments. > > This is a very, very important observation, and I think it belongs in > the DIP.

Re: DIP6: Attributes

2009-08-04 Thread Kagamin
grauzone Wrote: > > inheritance? > > You want to inherit annotations? What for? Backward compatibility: obtain annotation cast it, work with it, then later change its type. Annotations will be used by reflection, so classinfo will be useful.

Re: DIP6: Attributes

2009-08-04 Thread yigal chripun
Steven Schveighoffer Wrote: > > Yes, they have to be. There are reasons besides overloading for including > other attributes in the naming. > > For example, if a function is pure, then becomes unpure, you don't > existing code that is expecting a pure function to link against it. > > In oth

Re: DIP6: Attributes

2009-08-04 Thread yigal chripun
grauzone Wrote: > Daniel Keep wrote: > >> Yes, but then they're just keywords, with an @ in front. You'd just be > >> kidding yourself if you think you've reduced the keyword count. > > > > I suspect the reasoning goes like this: > > > > * I want attributes. Walter doesn't see the use. > > * Wa

Re: DIP6: Attributes

2009-08-04 Thread grauzone
Daniel Keep wrote: Yes, but then they're just keywords, with an @ in front. You'd just be kidding yourself if you think you've reduced the keyword count. I suspect the reasoning goes like this: * I want attributes. Walter doesn't see the use. * Walter complains about adding keywords. * I can

Re: DIP6: Attributes

2009-08-04 Thread Daniel Keep
Don wrote: > ... > > A question: in C#/Java, can you have annotations on function pointer and > delegate declarations? > > void foo( int delegate(int) pure dg) { > ... > } > What would this look like with annotations? Well, Java doesn't HAVE delegates and C# doesn't (AFAIK) allow you to defi

Re: DIP6: Attributes

2009-08-04 Thread Don
Steven Schveighoffer wrote: On Mon, 03 Aug 2009 11:42:33 -0400, Ary Borenszweig wrote: Don wrote: Ary Borenszweig wrote: Don escribió: grauzone wrote: Don wrote: Ary Borenszweig wrote: http://www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP6 This looks like a solution in search

Re: DIP6: Attributes

2009-08-03 Thread Benji Smith
Steven Schveighoffer wrote: Annotations have more usages than just how to serialize. Some uses I've seen in C#: * hints to an IDE about a GUI component (what it does, what properties to allow setting via the visual builder) * hints to the debugger about when to skip debugging certain function

Re: DIP6: Attributes

2009-08-03 Thread Benji Smith
Don wrote: Ary Borenszweig wrote: http://www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP6 This looks like a solution in search of a problem. What's the problem being solved? Keyword proliferation for a zillion tiny features? Annotations would help with that very nicely. --benji

Re: DIP6: Attributes

2009-08-03 Thread Sergey Gromov
Mon, 03 Aug 2009 15:16:25 -0400, Yigal Chripun wrote: > grauzone Wrote: > >> yigal chripun wrote: >>> this is a good start but as already noted by others, you can't specify >>> types with structs. we also can't use type tuples cause of the auto flatten >>> behavior. >> >> And why can't we use

Re: DIP6: Attributes

2009-08-03 Thread Leandro Lucarella
Steven Schveighoffer, el 3 de agosto a las 11:53 me escribiste: > >But the DIP I wrote isn't about general-purpose annotations. It's just the > >first step. Are "pure" and "nothrow" part of the mangling? Or which are? I > >thought not. Can you overload a pure and a not-pure function with the sam

Re: DIP6: Attributes

2009-08-03 Thread Yigal Chripun
grauzone Wrote: > yigal chripun wrote: > > this is a good start but as already noted by others, you can't specify > > types with structs. we also can't use type tuples cause of the auto flatten > > behavior. > > And why can't we use structs? Unless I've missed something, it wasn't > explained

Re: DIP6: Attributes

2009-08-03 Thread Denis Koroskin
/DIP6 This looks like a solution in search of a problem. What's the problem being solved? Attaching additional data to types, that can't be specified otherwhere. This should help with metaprogramming-like stuff. For example serialization. How do you specify that a field shouldn&#x

Re: DIP6: Attributes

2009-08-03 Thread KennyTM~
Don wrote: Ary Borenszweig wrote: Don escribió: grauzone wrote: Don wrote: Ary Borenszweig wrote: http://www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP6 This looks like a solution in search of a problem. What's the problem being solved? Attaching additional data to types,

Re: DIP6: Attributes

2009-08-03 Thread Daniel Keep
Ary Borenszweig wrote: > Daniel Keep wrote: >> >> grauzone wrote: >>> ... >>> For example serialization. How do you specify that a field shouldn't be >>> part of the serialized data? Java has an extra keyword attribute like >>> "transient" (comes from before attributes were introduced). C# uses w

Re: DIP6: Attributes

2009-08-03 Thread grauzone
Max Samukha wrote: It would be nice (and that is unlikely to happen) if the compiler could rewrite struct Foo { @Persistent("db_field") @Serializable int field; } to struct Foo { int field; mixin Persistent!("field", "db_field"); mixin Serializable!("field"); } It'd

Re: DIP6: Attributes

2009-08-03 Thread Max Samukha
On Tue, 04 Aug 2009 01:30:29 +1000, Daniel Keep wrote: > > >grauzone wrote: >> Don wrote: >>> Ary Borenszweig wrote: >>>> http://www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP6 >>> >>> This looks like a solution in se

Re: DIP6: Attributes

2009-08-03 Thread Steven Schveighoffer
On Mon, 03 Aug 2009 11:42:33 -0400, Ary Borenszweig wrote: Don wrote: Ary Borenszweig wrote: Don escribió: grauzone wrote: Don wrote: Ary Borenszweig wrote: http://www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP6 This looks like a solution in search of a problem. What'

Re: DIP6: Attributes

2009-08-03 Thread grauzone
Kagamin wrote: grauzone Wrote: yigal chripun wrote: this is a good start but as already noted by others, you can't specify types with structs. we also can't use type tuples cause of the auto flatten behavior. And why can't we use structs? Unless I've missed something, it wasn't explained in t

Re: DIP6: Attributes

2009-08-03 Thread Ary Borenszweig
Don wrote: Ary Borenszweig wrote: Don escribió: grauzone wrote: Don wrote: Ary Borenszweig wrote: http://www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP6 This looks like a solution in search of a problem. What's the problem being solved? Attaching additional data to types,

Re: DIP6: Attributes

2009-08-03 Thread Ary Borenszweig
Daniel Keep wrote: grauzone wrote: Don wrote: Ary Borenszweig wrote: http://www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP6 This looks like a solution in search of a problem. What's the problem being solved? Attaching additional data to types, that can't be specified

Re: DIP6: Attributes

2009-08-03 Thread Don
Steven Schveighoffer wrote: On Mon, 03 Aug 2009 09:26:21 -0400, Don wrote: grauzone wrote: Don wrote: Ary Borenszweig wrote: http://www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP6 This looks like a solution in search of a problem. What's the problem being solved?

Re: DIP6: Attributes

2009-08-03 Thread Don
Ary Borenszweig wrote: Don escribió: grauzone wrote: Don wrote: Ary Borenszweig wrote: http://www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP6 This looks like a solution in search of a problem. What's the problem being solved? Attaching additional data to types, that can

Re: DIP6: Attributes

2009-08-03 Thread Daniel Keep
grauzone wrote: > Don wrote: >> Ary Borenszweig wrote: >>> http://www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP6 >> >> This looks like a solution in search of a problem. What's the problem >> being solved? > > Attaching additional da

Re: DIP6: Attributes

2009-08-03 Thread Daniel Keep
I'd rather see this put off until we have macros; then steal the syntax to mean the same thing it does in Python.

Re: DIP6: Attributes

2009-08-03 Thread Leandro Lucarella
Ary Borenszweig, el 3 de agosto a las 11:14 me escribiste: > >annotation syntax in C# and Java looks like an ugly hack to me. Purely a > >subjective opinion, of course, but it seems really out of place in a > >C-family > >language. > > Attributes has many, many other uses. Appart from serializ

Re: DIP6: Attributes

2009-08-03 Thread Ary Borenszweig
Don escribió: grauzone wrote: Don wrote: Ary Borenszweig wrote: http://www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP6 This looks like a solution in search of a problem. What's the problem being solved? Attaching additional data to types, that can't be specified otherw

Re: DIP6: Attributes

2009-08-03 Thread Steven Schveighoffer
On Mon, 03 Aug 2009 09:26:21 -0400, Don wrote: grauzone wrote: Don wrote: Ary Borenszweig wrote: http://www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP6 This looks like a solution in search of a problem. What's the problem being solved? Attaching additional data to types,

Re: DIP6: Attributes

2009-08-03 Thread Kagamin
Don Wrote: > I agree that there doesn't seem to be a nice way at present. One > possibility would be to establish a naming convention for transient > fields -- a Ruby-style solution, I guess. > > But are annotations actually an ideal solution for this problem? > Presumably, you'll have to speci

Re: DIP6: Attributes

2009-08-03 Thread Don
grauzone wrote: Don wrote: Ary Borenszweig wrote: http://www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP6 This looks like a solution in search of a problem. What's the problem being solved? Attaching additional data to types, that can't be specified otherwhere. This s

Re: DIP6: Attributes

2009-08-03 Thread Kagamin
grauzone Wrote: > yigal chripun wrote: > > this is a good start but as already noted by others, you can't specify > > types with structs. we also can't use type tuples cause of the auto flatten > > behavior. > > And why can't we use structs? Unless I've missed something, it wasn't > explained

Re: DIP6: Attributes

2009-08-03 Thread Kagamin
Ary Borenszweig Wrote: > http://www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP6 VB uses angle brackets to delimit attributes. They usually don't repeat, only chain... unless you want to put them in strange places...

Re: DIP6: Attributes

2009-08-03 Thread Kagamin
Don Wrote: > Ary Borenszweig wrote: > > http://www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP6 > > This looks like a solution in search of a problem. What's the problem > being solved? Lack of power. People today want powerful language. With attributes you

Re: DIP6: Attributes

2009-08-03 Thread Ary Borenszweig
Lars T. Kyllingstad escribió: Ary Borenszweig wrote: http://www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP6 I like the idea of attributes having names that can never be identifiers, since adding new attributes will then, as you point out, never break existing code. But won'

Re: DIP6: Attributes

2009-08-03 Thread grauzone
yigal chripun wrote: this is a good start but as already noted by others, you can't specify types with structs. we also can't use type tuples cause of the auto flatten behavior. And why can't we use structs? Unless I've missed something, it wasn't explained in this thread.

Re: DIP6: Attributes

2009-08-03 Thread grauzone
Don wrote: Ary Borenszweig wrote: http://www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP6 This looks like a solution in search of a problem. What's the problem being solved? Attaching additional data to types, that can't be specified otherwhere. This should

Re: DIP6: Attributes

2009-08-03 Thread Lars T. Kyllingstad
Ary Borenszweig wrote: http://www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP6 I like the idea of attributes having names that can never be identifiers, since adding new attributes will then, as you point out, never break existing code. But won't we lose this benefit if we

Re: DIP6: Attributes

2009-08-03 Thread Don
Ary Borenszweig wrote: http://www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP6 This looks like a solution in search of a problem. What's the problem being solved?

Re: DIP6: Attributes

2009-08-03 Thread yigal chripun
grauzone Wrote: > Ary Borenszweig wrote: > > http://www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP6 > > The next step would be to introduce user defined annotations. I propose > this: > > //-- > > //declaring a user defined annotati

Re: DIP6: Attributes

2009-08-02 Thread grauzone
Ary Borenszweig wrote: http://www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP6 The next step would be to introduce user defined annotations. I propose this: //-- //declaring a user defined annotation type @annotation struct MyAnnotation { int x; char[] y

Re: DIP6: Attributes

2009-08-02 Thread grauzone
Ary Borenszweig wrote: http://www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP6 The next step would be to introduce user defined annotations. I propose this: //-- //declaring a user defined annotation type @annotation struct MyAnnotation { int x; char[] y

Re: DIP6: Attributes

2009-08-02 Thread Max Samukha
On Sun, 02 Aug 2009 07:54:49 -0700, Robert Fraser wrote: >Max Samukha wrote: >> On Sat, 01 Aug 2009 15:24:26 -0700, Robert Fraser >> wrote: >> >>> Ary Borenszweig wrote: >>>> http://www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP6 >>&g

Re: DIP guidelines [was: DIP6: Attributes]

2009-08-02 Thread Leandro Lucarella
Ary Borenszweig, el 2 de agosto a las 00:07 me escribiste: > Leandro Lucarella escribió: > >Ary Borenszweig, el 1 de agosto a las 16:29 me escribiste: > >>http://www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP6 > >Please, try to post at least the abstract of t

Re: DIP6: Attributes

2009-08-02 Thread Robert Fraser
Max Samukha wrote: On Sat, 01 Aug 2009 15:24:26 -0700, Robert Fraser wrote: Ary Borenszweig wrote: http://www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP6 I think annotations are a good idea, but turning keywords already in the language into annotations seems kinda pointless & w

Re: DIP6: Attributes

2009-08-02 Thread Chad J
Ary Borenszweig wrote: > http://www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP6 I like this. Metadata is a very useful thing.

Re: DIP6: Attributes

2009-08-02 Thread Max Samukha
On Sat, 01 Aug 2009 15:24:26 -0700, Robert Fraser wrote: >Ary Borenszweig wrote: >> http://www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP6 > >I think annotations are a good idea, but turning keywords already in the >language into annotations seems kinda pointless &

Re: DIP guidelines [was: DIP6: Attributes]

2009-08-01 Thread Jarrett Billingsley
On Sat, Aug 1, 2009 at 11:27 PM, Ellery Newcomer wrote: > They aren't. Decorators are deep crazy magic. As I recall, > > @mydecorator > def myfunc(argsnjunk): >    pass > > transforms all calls to myfunc to a call to a function you defined > somewhere named mydecorator, which takes a function and i

Re: DIP guidelines [was: DIP6: Attributes]

2009-08-01 Thread Ellery Newcomer
Ary Borenszweig wrote: > Leandro Lucarella escribió: >> Ary Borenszweig, el 1 de agosto a las 16:29 me escribiste: >>> http://www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP6 >> >> Please, try to post at least the abstract of the DIP with the link, so >&g

Re: DIP guidelines [was: DIP6: Attributes]

2009-08-01 Thread Ary Borenszweig
Leandro Lucarella escribió: Ary Borenszweig, el 1 de agosto a las 16:29 me escribiste: http://www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP6 Please, try to post at least the abstract of the DIP with the link, so people can easily know what is it about =) And when writing a DIP, try

Re: DIP guidelines [was: DIP6: Attributes]

2009-08-01 Thread Leandro Lucarella
Leandro Lucarella, el 1 de agosto a las 20:28 me escribiste: > Ary Borenszweig, el 1 de agosto a las 16:29 me escribiste: > > http://www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP6 > > Please, try to post at least the abstract of the DIP with the link, so > people ca

Re: DIP6: Attributes

2009-08-01 Thread Leandro Lucarella
Ary Borenszweig, el 1 de agosto a las 16:29 me escribiste: > http://www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP6 I really think that D should support some kind of annotations. I think it's a good idea to add them in stages. I could add that in the first stage, old-style at

DIP guidelines [was: DIP6: Attributes]

2009-08-01 Thread Leandro Lucarella
Ary Borenszweig, el 1 de agosto a las 16:29 me escribiste: > http://www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP6 Please, try to post at least the abstract of the DIP with the link, so people can easily know what is it about =) And when writing a DIP, try to make the abstract a lit

Re: DIP6: Attributes

2009-08-01 Thread Ellery Newcomer
Robert Fraser wrote: > Ary Borenszweig wrote: >> http://www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP6 > > I think annotations are a good idea, but turning keywords already in the > language into annotations seems kinda pointless & would kill backwards > compa

  1   2   >