Re: destructor

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

I know that the delete() call might be superfluous in most cases but its not wrong.

Guess I should have read better grin

Although it will not force that change, why introduce memory management into Euphoria for just one version? I know that you have suggested it is the same as open/close, but I disagree (I may be the only one, I don't know) but the concept of opening/closing a file is everywhere and anyone understands that, even non-programmers as they open a file in Microsoft Word and a lot of times Close that file when they are done.

Creating a new map (structure in memory) and then having to close that memory structure is memory management, any way you call it and I am not sure of any other language that requires you to close a hash table or close a map (with the exception of those that require you to use memory management, that is).

For those reasons, I think we should avoid ever introducing memory management requirements into the standard library. Matt has alleviated this problem with Regular Expressions and I think we should go the extra step to alleviate it with map and stack as well. We could have just called re:free() re:close() but that doesn't make sense either, as other languages do not close a regular expression either.

My 2 cents.

Jeremy

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

Search



Quick Links

User menu

Not signed in.

Misc Menu