You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In C: You have an allocation (malloc, ...) and a deallocation (free).
In C++: You have an allocation (new) and a deallocation (delete).
If you remove the deallocation from the view of the user, why are you keeping the
allocation?
From the user point-of-view, you break the symmetry of the allocation by removing the
deallocation. If you are trying to hide your garbage collector by making it as smooth
as
possible, then why are you trying to inform developers about the garbage collector by
keeping
this broken symmetry?
Java already made this choice and the consequence is that Java programmers may have
difficulties to change to C++ if they are not aware of deallocation.
To ease the life of recruiter (in 10 years) and to clarify programmers ideas of
allocation, I
suggest to remove the "new" keyword which is just a syntactic sugar over the
an empty initialization of a structure.
The text was updated successfully, but these errors were encountered:
The bug tracker is best suiting to recording precise issues. These sorts of ideas are
better suited to mailing lists. So I'm closing this issue as an administrative matter,
not because I'm rejecting the idea out of hand.
However, new(*T) is difficult to replace with initialisation syntax. (Or new(**T) etc)
mikioh
changed the title
Proposal: Remove the "new" keyword because there is no "delete".
proposal: Remove the "new" keyword because there is no "delete".
Aug 31, 2015
by nicolas.b.pierron:
The text was updated successfully, but these errors were encountered: