Feature Request: Label assignment / type
Joe Pusdesris
deformative0 at gmail.com
Fri Nov 16 16:21:07 PST 2007
I think it would be very useful to have a label type. This way labels could
be assigned and passed around, opening up some flexability. An example of
it's usefulness would be in constructing and manipulating a jump table or
navigating subroutines without calling a function. A goto is a lot faster
than a function call.
Possible syntax:
someLabel:
...
Label l = someLabel;
...
goto l;
Possible problems:
Difficulties would arise with limiting the variable to contain it within the
current scope.
I suppose some aspects of this are possible with -inline, but I think this
feature would be useful nonetheless.
Some feedback would be appreciated.
More information about the Digitalmars-d
mailing list