Labels as values and threaded-code interpretation
Alex Rønne Petersen
alex at lycus.org
Sat Jun 1 21:52:29 PDT 2013
On 02-06-2013 05:18, Andrej Mitrovic wrote:
> On 6/1/13, Timon Gehr <timon.gehr at gmx.ch> wrote:
>> D (like C) uses a different namespace for labels and symbols that are
>> not labels.
>
> Perhaps for experimenting purposes (before resorting to language
> changes), a trait could be introduced. E.g.:
>
>> void main(){
>> int foo;
>> foo: auto b = __traits(gotoAddr, foo);
>> }
>
> And if it's successful, we add language support.
>
You need a way to jump to an arbitrary address too.
--
Alex Rønne Petersen
alex at alexrp.com / alex at lycus.org
http://alexrp.com / http://lycus.org
More information about the Digitalmars-d
mailing list