Re: destructor
- Posted by jeremy (admin) Mar 15, 2009
- 902 views
We need an explicit delete mechanism because sometimes one needs to delete a map/whatever before it goes out of scope.
Hm, I'm not sure I've ever had to do that in any other language. I simply put the map in the scope that it's valid. I do know sometimes you may need to clear a map, but that's not the same as deleting it's very existence, but further, one should not have to clear/delete a map when they are done using it for 4.0 and then no longer have to for 4.1. I think this teaching of the users just for 4.0 is not wise. Euphoria takes care of it's own memory and does not require the user to do so. If we do not have UDT's in 4.0 then this is no longer the case. Users will then have to learn about memory management, and for just one version? When 4.1 comes out, not having to do it? (ok, they could still do it if they wanted, but in 4.1 it would be the rare exception, not the norm like you are suggesting they have to do in 4.0).
Personally, if it came down to UDT's not in 4.0, I think it would be wiser to not ship map/stack and introduce them in 4.1 when UDT's or PBR is in Euphoria.
All I'm saying is that PBR and UDT dtors are not essential to having v4.0 ship.
I'm not yet convinced, but I'm not the sole decision maker on these things, maybe we need to discuss it on the dev list amongst the other developers and vote on this?
Jeremy