Local Function Scope Keyword [+]

downs default_357-line at yahoo.de
Thu Jan 17 07:39:42 PST 2008


RicHardacre wrote:
> I wrote this up here: http://www.prowiki.org/wiki4d/wiki.cgi?action=browse&id=FeatureRequestList/LocalScopeOperator
> 
> 
> the problem it attempts to solve is that sometimes you want to know what function you are in and the "this" keyword won't help you unless you hardcode all your function names in everywhere. instead i suggest the word "scope" (or something else) to mean "the current function instance under the current class instance" and possibly "this.scope" to find the class's entrypoint (the first function called by an external class/function) 
> 
> I havent fully thought it through but i'm in the middle of some funky delegate / call stack shenanigans in c# and something like this would save me a bunch of variables/hard coded function names and generally make it look cleaner.

Vote in favor, not that anybody cares.

self as a keyword is still free :)

 --downs



More information about the Digitalmars-d mailing list