01-08-2006, 11:14 AM
Agamemnus, I'm afraid I don't follow. Could you elaborate?
stylin:
Poll: Is it worth creating a generic MACRO library while we wait for templates? You do not have permission to vote in this poll. |
|||
Yes, and I would definitely have a use for it | 10 | 100.00% | |
Yes, but I probably use very little of it, if at all. | 0 | 0% | |
I don\'t know. | 0 | 0% | |
No, I\'d rather wait for template support. | 0 | 0% | |
Total | 10 vote(s) | 100% |
* You voted for this item. | [Show Results] |
Standard MACRO Library
|
01-15-2006, 03:03 AM
Something that can make, say, "IF X IS NOT EQUAL TO 5" into "IF X <> 5".
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."
Visit www.neobasic.net to see rubbish in all its finest.
01-30-2006, 05:15 AM
Well..... it could be useful for...other...things...with spaces....
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."
Visit www.neobasic.net to see rubbish in all its finest.
01-30-2006, 06:55 AM
still sad...
i wonder how you are going about the deallocators. i can't see a generic way to do this for arbitrary udts that have, say dynamically allocated memory in them that could again point to other dynamically allocated memory ad infinitum
01-30-2006, 12:06 PM
Quote:still sad... Dynamically allocated memory associated with a UDT is always the responsibility of the programmer to deal with. Even the STL will leak memory if we don't manually deallocate our resources. Currently, I'm jury-rigging constructor and destructor calls in the raw memory functions (in all implementations I've studied, the STL allocates memory and constructs objects on demand). So basically, there's no difference than having classes except for the fact that the client must manually construct their objects (as opposed to merely initializing objects and having the compiler construct the object for you, ala C++, Java, etc.) A little cumbersome, to be sure, but hey - what can you do? I just wish I knew what the syntax for classes is going to be when they finally get supported so I can start reworking the library; since it looks like templates are probably not going to be a reality, at least for a long while (years, I supppose), I won't feel too bad about committing the entire code-base to MACRO'd classes.
stylin:
|
« Next Oldest | Next Newest »
|