Re: pointers to variables ?

new topic     » goto parent     » topic index » view thread      » older message » newer message
ghaberek said...

I'm not sure we should want to set a value this way. I guess I don't see a problem using it as a more direct pass-by-reference feature (instead of eumem) but I'm worried one could clobber the wrong data and bring the whole thing crashing down. Hopefully we can agree that doing any modification to the symbol table itself is a bad idea. The symbol table should be static at runtime. There may come a time when we can manipulate the symbol table as we like but today is not that day.

-Greg

Yup, agreed. Especially considering:

cjnwl said...

Using SYMTAB in gawk (GNU-awk) is allowed, both reading and modifying values, but not creating new variables. And the ability to use this feature to emulate pointers is explicitly mentioned in the doc.

Moving on..

ghaberek said...

I'm hesitant to suggest that as an answer here. Mostly I don't want to encourage the use of debugging features outside of a debugging context. But that's another reason to keep this as debug-only

Yeah, in retrospect I should have added a "DO NOT USE UNLESS YOU KNOW WHAT YOU ARE DOING" warning to that.

I just wanted to point out that technically, it was now technically possible, and therefore not a case of "we lack that feature". But certainly eumem and maps maybe an easier way of doing the same.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu