Re: Should compilers take advantage (abuse) of the new UDA syntax that has been accepted?

2012-12-28 Thread Johannes Pfau
Am Fri, 28 Dec 2012 13:28:51 + schrieb Iain Buclaw : > > > Someone recently mentioned @gccAttribute("foo", "bar"); as a > prototype. > > That looks like a good solution. And it should be much simpler to implement than my proposal.

Re: Should compilers take advantage (abuse) of the new UDA syntax that has been accepted?

2012-12-28 Thread Iain Buclaw
On 18 December 2012 20:11, Johannes Pfau wrote: > Am Tue, 18 Dec 2012 20:06:16 +0100 > schrieb "jerro" : > > > You could also define them in compiler > > specific modules as has already been discussed in this thread, > > but then code that used them without full names (including the > > module na

Re: Should compilers take advantage (abuse) of the new UDA syntax that has been accepted?

2012-12-18 Thread Simen Kjaeraas
On 2012-11-18 21:12, Johannes Pfau wrote: Am Tue, 18 Dec 2012 20:06:16 +0100 schrieb "jerro" : You could also define them in compiler specific modules as has already been discussed in this thread, but then code that used them without full names (including the module name) would break if an at

Re: Should compilers take advantage (abuse) of the new UDA syntax that has been accepted?

2012-12-18 Thread Iain Buclaw
On 18 December 2012 22:23, Iain Buclaw wrote: > pushing out things that can't be done in any other way into gcc-proper. One example of this are version identifiers specific to target architectures. Where I suggested each target D is ported to should define it's own TARGET_CPU_D_BUILTINS macro,

Re: Should compilers take advantage (abuse) of the new UDA syntax that has been accepted?

2012-12-18 Thread Iain Buclaw
On 18 December 2012 21:36, Artur Skawina wrote: > On 12/18/12 21:33, Iain Buclaw wrote: > > b) No one infact uses GDC (go figure!). > > > Similarly, no one has noticed that most of the pragma GDC supported have > mysterious vanished either. The ones left at kept only for gcc.builtins > support

Re: Should compilers take advantage (abuse) of the new UDA syntax that has been accepted?

2012-12-18 Thread Iain Buclaw
On 18 December 2012 21:31, Andrei Alexandrescu < seewebsiteforem...@erdani.org> wrote: > On 12/18/12 11:58 AM, Iain Buclaw wrote: > >> On 18 December 2012 16:43, Peter Alexander > > >> wrote: >> >> On Tuesday, 18 December 2012 at 15:19:58 UTC, Iain Bucla

Re: Should compilers take advantage (abuse) of the new UDA syntax that has been accepted?

2012-12-18 Thread Artur Skawina
On 12/18/12 21:33, Iain Buclaw wrote: > b) No one infact uses GDC (go figure!). > Similarly, no one has noticed that most of the pragma GDC supported have > mysterious vanished either. The ones left at kept only for gcc.builtins > support until a time I re-implement the attributes in a better

Re: Should compilers take advantage (abuse) of the new UDA syntax that has been accepted?

2012-12-18 Thread Andrei Alexandrescu
On 12/18/12 11:58 AM, Iain Buclaw wrote: On 18 December 2012 16:43, Peter Alexander mailto:peter.alexander...@gmail.com>> wrote: On Tuesday, 18 December 2012 at 15:19:58 UTC, Iain Buclaw wrote: Should we take this as an opportunity for other compiler maintainers to implement

Re: Should compilers take advantage (abuse) of the new UDA syntax that has been accepted?

2012-12-18 Thread David Nadlinger
On Tuesday, 18 December 2012 at 20:27:31 UTC, deadalnix wrote: Many other programming languages aren't as conservative as C++. I thing the key point here is to have a tool to handle the refactoring automatically. It seems way easier to provide such a tool in D than in C++. I think it's quite

Re: Should compilers take advantage (abuse) of the new UDA syntax that has been accepted?

2012-12-18 Thread Iain Buclaw
On 18 December 2012 19:23, Peter Alexander wrote: > I think this should be advertised that such a feature is in some GDC's >> specific module, and that it can clash with any library symbol at any time, >> as it is not a standardized feature of the language. >> > > Doesn't matter whether you advert

Re: Should compilers take advantage (abuse) of the new UDA syntax that has been accepted?

2012-12-18 Thread deadalnix
On Tuesday, 18 December 2012 at 19:23:18 UTC, Peter Alexander wrote: I think this should be advertised that such a feature is in some GDC's specific module, and that it can clash with any library symbol at any time, as it is not a standardized feature of the language. Doesn't matter whether

Re: Should compilers take advantage (abuse) of the new UDA syntax that has been accepted?

2012-12-18 Thread Johannes Pfau
Am Tue, 18 Dec 2012 20:06:16 +0100 schrieb "jerro" : > You could also define them in compiler > specific modules as has already been discussed in this thread, > but then code that used them without full names (including the > module name) would break if an attribute with the same name was > ad

Re: Should compilers take advantage (abuse) of the new UDA syntax that has been accepted?

2012-12-18 Thread Peter Alexander
On Tuesday, 18 December 2012 at 19:08:06 UTC, deadalnix wrote: On Tuesday, 18 December 2012 at 16:47:37 UTC, Peter Alexander wrote: On Tuesday, 18 December 2012 at 16:43:53 UTC, Peter Alexander wrote: On Tuesday, 18 December 2012 at 15:19:58 UTC, Iain Buclaw wrote: Should we take this as an opp

Re: Should compilers take advantage (abuse) of the new UDA syntax that has been accepted?

2012-12-18 Thread deadalnix
On Tuesday, 18 December 2012 at 16:47:37 UTC, Peter Alexander wrote: On Tuesday, 18 December 2012 at 16:43:53 UTC, Peter Alexander wrote: On Tuesday, 18 December 2012 at 15:19:58 UTC, Iain Buclaw wrote: Should we take this as an opportunity for other compiler maintainers to implement their own

Re: Should compilers take advantage (abuse) of the new UDA syntax that has been accepted?

2012-12-18 Thread jerro
On *that* particular attribute, I will accept that there isn't much you could do differently from a theoretical standardised version. The problem is, as soon as you add one compiler specific attribute, it will be used as a precedence for adding others. You could just name compiler specific at

Re: Should compilers take advantage (abuse) of the new UDA syntax that has been accepted?

2012-12-18 Thread Peter Alexander
On Tuesday, 18 December 2012 at 16:58:32 UTC, Iain Buclaw wrote: Provide a situation where @noreturn attribute would mean anything other than telling the compiler to assume that the function cannot return, and I might please you on *that* particular attribute. On *that* particular attribute,

Re: Should compilers take advantage (abuse) of the new UDA syntax that has been accepted?

2012-12-18 Thread Iain Buclaw
On 18 December 2012 16:58, Iain Buclaw wrote: > On 18 December 2012 16:43, Peter Alexander > wrote: > >> On Tuesday, 18 December 2012 at 15:19:58 UTC, Iain Buclaw wrote: >> >>> Should we take this as an opportunity for other compiler maintainers to >>> implement their own compiler-specific prede

Re: Should compilers take advantage (abuse) of the new UDA syntax that has been accepted?

2012-12-18 Thread Iain Buclaw
On 18 December 2012 16:43, Peter Alexander wrote: > On Tuesday, 18 December 2012 at 15:19:58 UTC, Iain Buclaw wrote: > >> Should we take this as an opportunity for other compiler maintainers to >> implement their own compiler-specific predefined attributes? >> > > Please, no! > > Suppose GDC imple

Re: Should compilers take advantage (abuse) of the new UDA syntax that has been accepted?

2012-12-18 Thread Peter Alexander
On Tuesday, 18 December 2012 at 16:43:53 UTC, Peter Alexander wrote: On Tuesday, 18 December 2012 at 15:19:58 UTC, Iain Buclaw wrote: Should we take this as an opportunity for other compiler maintainers to implement their own compiler-specific predefined attributes? Please, no! Before anyon

Re: Should compilers take advantage (abuse) of the new UDA syntax that has been accepted?

2012-12-18 Thread Peter Alexander
On Tuesday, 18 December 2012 at 15:19:58 UTC, Iain Buclaw wrote: Should we take this as an opportunity for other compiler maintainers to implement their own compiler-specific predefined attributes? Please, no! Suppose GDC implements @noreturn (or whatever other attribute) Later, LDC implemen

Re: Should compilers take advantage (abuse) of the new UDA syntax that has been accepted?

2012-12-18 Thread Walter Bright
On 12/18/2012 7:48 AM, bearophile wrote: Is this name clashing acceptable? Yes.

Re: Should compilers take advantage (abuse) of the new UDA syntax that has been accepted?

2012-12-18 Thread bearophile
Iain Buclaw: Where GDC has the following to allow developers to mark functions with the backend attribute 'noreturn'. pragma(attribute, noreturn) void die() { abort(); } Potentially this can now be re-written as. void die() @noreturn { abort(); } Would you guys stand for such a chan

Re: Should compilers take advantage (abuse) of the new UDA syntax that has been accepted?

2012-12-18 Thread Iain Buclaw
On 18 December 2012 15:29, Adam D. Ruppe wrote: > On Tuesday, 18 December 2012 at 15:19:58 UTC, Iain Buclaw wrote: > >> Should we take this as an opportunity for other compiler maintainers to >> implement their own compiler-specific predefined attributes? >> > > I think it'd be great if we used m

Re: Should compilers take advantage (abuse) of the new UDA syntax that has been accepted?

2012-12-18 Thread Adam D. Ruppe
On Tuesday, 18 December 2012 at 15:19:58 UTC, Iain Buclaw wrote: Should we take this as an opportunity for other compiler maintainers to implement their own compiler-specific predefined attributes? I think it'd be great if we used magical full names, but otherwise it is the same as the librar

Re: Should compilers take advantage (abuse) of the new UDA syntax that has been accepted?

2012-12-18 Thread Iain Buclaw
On 18 December 2012 15:24, Iain Buclaw wrote: > On 18 December 2012 15:19, Iain Buclaw wrote: > >> Potentially this can now be re-written as. >> >> void die() @noreturn >> { >>abort(); >> } >> >> > By the way, this would be the first time that @noreturn has been brought > up. > s/would/woul

Re: Should compilers take advantage (abuse) of the new UDA syntax that has been accepted?

2012-12-18 Thread Iain Buclaw
On 18 December 2012 15:19, Iain Buclaw wrote: > Potentially this can now be re-written as. > > void die() @noreturn > { >abort(); > } > > By the way, this would be the first time that @noreturn has been brought up. http://forum.dlang.org/thread/i9p9li$282u$1...@digitalmars.com -- Iain Buc

Should compilers take advantage (abuse) of the new UDA syntax that has been accepted?

2012-12-18 Thread Iain Buclaw
Now that UDA's have extended their support to @attribute https://github.com/D-Programming-Language/dmd/commit/0814f9decfdbcef644c4e89b02b8be192ed2e900 Should we take this as an opportunity for other compiler maintainers to implement their own compiler-specific predefined attributes? Exampl