digitalmars.D - deprecated alias
- kris (3/3) Feb 16 2007 Syntactically, the compiler allows "deprecated alias foo bar;" but the
- Ary Manzana (7/15) Feb 16 2007 As far as I know, *any* declaration (imports, typedefs, static asserts,
- kris (4/24) Feb 16 2007 Hehe ... just want to know if deprecated is intended to work with alias
- Chris Miller (12/15) Feb 17 2007 I did notice deprecated isn't working in all cases, and it seemed to me ...
- Lars Ivar Igesund (9/27) Feb 17 2007 I tried to test this, and the compiler did not pick up the deprecated al...
- Lars Ivar Igesund (9/34) Feb 17 2007 Actually it did, but not the way I expected. If you use the declared sym...
Syntactically, the compiler allows "deprecated alias foo bar;" but the deprecated attribute is apparently ignored? Is this intentional?
Feb 16 2007
kris escribió: kris escribió:Syntactically, the compiler allows "deprecated alias foo bar;" but the deprecated attribute is apparently ignored? Is this intentional?Syntactically, the compiler allows "deprecated alias foo bar;" but the deprecated attribute is apparently ignored? Is this intentional?As far as I know, *any* declaration (imports, typedefs, static asserts, debug, version, etc.) allow *any* modifier. I don't know if it's intentional, but at least that's the way the DMD parser works. I guess this makes the parser faster than worrying about this things, but that's just a guess.
Feb 16 2007
Ary Manzana wrote:kris escribió: kris escribió:Hehe ... just want to know if deprecated is intended to work with alias or not? And if so, can we expect a fix for it soon? :)Syntactically, the compiler allows "deprecated alias foo bar;" but the deprecated attribute is apparently ignored? Is this intentional?Syntactically, the compiler allows "deprecated alias foo bar;" but the deprecated attribute is apparently ignored? Is this intentional?As far as I know, *any* declaration (imports, typedefs, static asserts, debug, version, etc.) allow *any* modifier. I don't know if it's intentional, but at least that's the way the DMD parser works. I guess this makes the parser faster than worrying about this things, but that's just a guess.
Feb 16 2007
On Fri, 16 Feb 2007 16:37:40 -0500, kris <foo bar.com> wrote:Syntactically, the compiler allows "deprecated alias foo bar;" but the deprecated attribute is apparently ignored? Is this intentional?I did notice deprecated isn't working in all cases, and it seemed to me that it's only working when accessing deprecated things in other code. It might just be a bug and isn't quite happening this way, but it's what I got from it, and I realized it would be a decent way of handling it. If my code accesses a deprecated thing from within the same file, it's quite OK; like private. It's probably just happening to support the deprecated feature. e.g. a deprecated function calling another deprecated function in the same file shouldn't require -d; it might be just a stub with different parameters calling the full implementation, or calling a helper function that is also deprecated, in order to continue supporting a deprecated feature.
Feb 17 2007
Chris Miller wrote:On Fri, 16 Feb 2007 16:37:40 -0500, kris <foo bar.com> wrote:I tried to test this, and the compiler did not pick up the deprecated alias if used in the client code. An additional factor that may have played a role in this particular test was that it was a .di file. -- Lars Ivar Igesund blog at http://larsivi.net DSource, #d.tango & #D: larsivi Dancing the TangoSyntactically, the compiler allows "deprecated alias foo bar;" but the deprecated attribute is apparently ignored? Is this intentional?I did notice deprecated isn't working in all cases, and it seemed to me that it's only working when accessing deprecated things in other code. It might just be a bug and isn't quite happening this way, but it's what I got from it, and I realized it would be a decent way of handling it. If my code accesses a deprecated thing from within the same file, it's quite OK; like private. It's probably just happening to support the deprecated feature. e.g. a deprecated function calling another deprecated function in the same file shouldn't require -d; it might be just a stub with different parameters calling the full implementation, or calling a helper function that is also deprecated, in order to continue supporting a deprecated feature.
Feb 17 2007
Lars Ivar Igesund wrote:Chris Miller wrote:Actually it did, but not the way I expected. If you use the declared symbol, not the alias, then you will get a deprecation message. Starts to sound like a bug. -- Lars Ivar Igesund blog at http://larsivi.net DSource, #d.tango & #D: larsivi Dancing the TangoOn Fri, 16 Feb 2007 16:37:40 -0500, kris <foo bar.com> wrote:I tried to test this, and the compiler did not pick up the deprecated alias if used in the client code. An additional factor that may have played a role in this particular test was that it was a .di file.Syntactically, the compiler allows "deprecated alias foo bar;" but the deprecated attribute is apparently ignored? Is this intentional?I did notice deprecated isn't working in all cases, and it seemed to me that it's only working when accessing deprecated things in other code. It might just be a bug and isn't quite happening this way, but it's what I got from it, and I realized it would be a decent way of handling it. If my code accesses a deprecated thing from within the same file, it's quite OK; like private. It's probably just happening to support the deprecated feature. e.g. a deprecated function calling another deprecated function in the same file shouldn't require -d; it might be just a stub with different parameters calling the full implementation, or calling a helper function that is also deprecated, in order to continue supporting a deprecated feature.
Feb 17 2007