digitalmars.D.learn - About and UDA
- Andrea Fontana (13/13) Apr 15 2015 My 2 cents. If I remember correctly, "@" prefix in @safe,
- Jacob Carlborg (9/19) Apr 15 2015 Yes, it would be a crazy idea. Actually, there's already another syntax,...
- ketmar (3/16) Apr 15 2015 or make "safe" and company "context keywords". along with "body" (oh, ho...
- Vlad Levenfeld (2/5) Apr 16 2015 Ugh, yeah. Makes physics code awkward.
- "Marc =?UTF-8?B?U2Now7x0eiI=?= <schuetzm gmx.net> (2/7) Apr 16 2015 And DOM.
- =?ISO-8859-15?Q?S=F6nke_Ludwig?= (7/23) Apr 17 2015 +1 for body
- Jacob Carlborg (6/9) Apr 17 2015 UDA's were available when these attributes/keywords were created.
- Jacob Carlborg (4/7) Apr 18 2015 Were _not_ available ...
My 2 cents. If I remember correctly, " " prefix in safe, trusted, system, etc was added just to avoid keywords pollution, right? Now UDA uses the same prefix: if some new keywords/properties/attributes will be added to D, the same problem will come back again... Is it a crazy idea to deprecate be a language attribute and #xxx will be a user defined attribute. No pollution, no clashes. Maybe it's not too late to do this change. I think it will be not a big effort to replace uda syntax in existing projects (a deprecation warning will help). Andrea
Apr 15 2015
On 2015-04-15 10:53, Andrea Fontana wrote:My 2 cents. If I remember correctly, " " prefix in safe, trusted, system, etc was added just to avoid keywords pollution, right? Now UDA uses the same prefix: if some new keywords/properties/attributes will be added to D, the same problem will come back again... Is it a this way xxx will be a language attribute and #xxx will be a user defined attribute. No pollution, no clashes.Yes, it would be a crazy idea. Actually, there's already another syntax, deprecated, for UDA's. It was deprecated when it was added. Then the current syntax was added.Maybe it's not too late to do this change. I think it will be not a big effort to replace uda syntax in existing projects (a deprecation warning will help).No, the solution is to add any new attributes, not as keywords but as compiler recognized UDA's. Then it's possible to use the fully qualified name of the UDA to disambiguate. -- /Jacob Carlborg
Apr 15 2015
On Wed, 15 Apr 2015 08:53:05 +0000, Andrea Fontana wrote:My 2 cents. If I remember correctly, " " prefix in safe, trusted, system, etc was added just to avoid keywords pollution, right? =20 Now UDA uses the same prefix: if some new keywords/properties/attributes will be added to D, the same problem will come back again... Is it a crazy idea to deprecate language attribute and #xxx will be a user defined attribute. No pollution, no clashes. =20 Maybe it's not too late to do this change. I think it will be not a big effort to replace uda syntax in existing projects (a deprecation warning will help).or make "safe" and company "context keywords". along with "body" (oh, how=20 i hate the unabilily to declare "body" member!")=
Apr 15 2015
On Wednesday, 15 April 2015 at 16:59:12 UTC, ketmar wrote:or make "safe" and company "context keywords". along with "body" (oh, how i hate the unabilily to declare "body" member!")Ugh, yeah. Makes physics code awkward.
Apr 16 2015
On Thursday, 16 April 2015 at 20:09:07 UTC, Vlad Levenfeld wrote:On Wednesday, 15 April 2015 at 16:59:12 UTC, ketmar wrote:And DOM.or make "safe" and company "context keywords". along with "body" (oh, how i hate the unabilily to declare "body" member!")Ugh, yeah. Makes physics code awkward.
Apr 16 2015
Am 15.04.2015 um 18:59 schrieb ketmar:On Wed, 15 Apr 2015 08:53:05 +0000, Andrea Fontana wrote:+1 for body I still haven't got the reason though, why "safe" and friends cannot simply be UDAs defined in object.d that the compiler recognizes. I'd also reserve a bunch of attributes now to avoid a never ending sequence of breaking changes (such as good anti-keywords to scope, immutable, pure etc.).My 2 cents. If I remember correctly, " " prefix in safe, trusted, system, etc was added just to avoid keywords pollution, right? Now UDA uses the same prefix: if some new keywords/properties/attributes will be added to D, the same problem will come back again... Is it a crazy idea to deprecate language attribute and #xxx will be a user defined attribute. No pollution, no clashes. Maybe it's not too late to do this change. I think it will be not a big effort to replace uda syntax in existing projects (a deprecation warning will help).or make "safe" and company "context keywords". along with "body" (oh, how i hate the unabilily to declare "body" member!")
Apr 17 2015
On 2015-04-17 16:34, Sönke Ludwig wrote:+1 for body I still haven't got the reason though, why "safe" and friends cannot simply be UDAs defined in object.d that the compiler recognizes.UDA's were available when these attributes/keywords were created. Reasons why they're still not UDA's are probably a mix of avoiding code breakage and someone that needs to make the change. -- /Jacob Carlborg
Apr 17 2015
On 2015-04-17 21:35, Jacob Carlborg wrote:UDA's were available when these attributes/keywords were created. Reasons why they're still not UDA's are probably a mix of avoiding code breakage and someone that needs to make the change.Were _not_ available ... -- /Jacob Carlborg
Apr 18 2015