Local Function Scope Keyword

RicHardacre ric.hardacre at cyclomedia.co.uk
Thu Jan 17 03:39:46 PST 2008


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.



More information about the Digitalmars-d mailing list