Thread overview | |||||
---|---|---|---|---|---|
|
April 17, 2007 miss __FUNCTION__ so much | ||||
---|---|---|---|---|
| ||||
i think there wouldn't be much effort to make it ? |
April 17, 2007 Re: miss __FUNCTION__ so much | ||||
---|---|---|---|---|
| ||||
Posted in reply to Davidl | Davidl wrote: > i think there wouldn't be much effort to make it ? I think what would be better was a compile-time context object that told us what scope we were at (module, function, class, etc.), what the current enclosing symbol is called, what kind of symbol it is, what its arguments/base types are, etc., and a reference to the enclosing context as well. I mean, if we're going to do this, we may as well do it properly :) -- Daniel -- int getRandomNumber() { return 4; // chosen by fair dice roll. // guaranteed to be random. } http://xkcd.com/ v2sw5+8Yhw5ln4+5pr6OFPma8u6+7Lw4Tm6+7l6+7D i28a2Xs3MSr2e4/6+7t4TNSMb6HTOp5en5g6RAHCP http://hackerkey.com/ |
April 17, 2007 Re: miss __FUNCTION__ so much | ||||
---|---|---|---|---|
| ||||
Posted in reply to Daniel Keep | Daniel Keep Wrote:
> I think what would be better was a compile-time context object that told us what scope we were at (module, function, class, etc.), what the current enclosing symbol is called, what kind of symbol it is, what its arguments/base types are, etc., and a reference to the enclosing context as well.
In that light, please wait for Walter to release the AST reflection feature, as it ought to include such functionality and will also come with a reasonable API with which to access such things.
Many many things are building up that want the AST reflection feature, Walter. : )
Any chance I could contribute some time on it?
|
Copyright © 1999-2021 by the D Language Foundation