Feature Request: Label assignment / type
TomD
t_demmer at nospam.web.de
Sat Nov 17 02:07:47 PST 2007
Joe Pusdesris Wrote:
> 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.
Wow, assigned goto, alive in FORTRAN IV, buried in FORTRAN 77,
coming back a zombie. Obfuscation is, as far as I can tell, not
too high on Walter's list.
Ciao
Tom
More information about the Digitalmars-d
mailing list