|
|
|
|
|
by meta
4978 days ago
|
|
Cool idea. I am confused by the implication of this code var prices = new(Table, String, Int);
put(prices, $(String, "Apple"), $(Int, 12));
Stack objects are created with "$" so these are on the stack and then placed into the Table? So if this was in a function and the function returned, the Table (lets assume it was global) would now be pointing to destroyed stack variables? Is that the correct interpretation?Is this all done with header files and the preprocessor? It looks like that is the case - if so, I am impressed at the dances you got it to do ;) Also, have you read http://www.amazon.com/Interfaces-Implementations-Techniques-... which does some "Object Orientation" in C tricks? |
|