Deterministic resource freeing - delete deprecation (again)
Steven Schveighoffer
schveiguy at yahoo.com
Fri Apr 29 12:39:18 PDT 2011
On Fri, 29 Apr 2011 15:18:23 -0400, Francisco Almeida
<francisco.m.almeida at gmail.com> wrote:
> On 28-04-2011 17:09, Steven Schveighoffer wrote:
>> On Wed, 27 Apr 2011 17:30:54 -0400, Alexander <aldem+dmars at nk7.net>
>> wrote:
>>
>>> On 27.04.2011 19:13, Steven Schveighoffer wrote:
>>>
>>>> clear is not a keyword, it is possible to name a member clear, and
>>>> also have a clear global function.
>>>
>>> Sure it is, though it is counter-intuitive - to use same name with
>>> quite different meaning. As for me, if this will really be in final
>>> spec, I'll always alias it to destroy().
>>
>> That has been pointed out before. Yes, it is considered a bad idea to do
>> that, but we have no choice now, clear is the name.
>
> We have no choice? Since when is a function "part of the language"? It
> could still be renamed with minimal to no impact on Phobos. If it
> *really* cannot be renamed (which I doubt), then ok, I guess we'll have
> to live with it.
It's already in the official book describing the language (IIRC, there's
quite a bit of text on it). At some point, we have to stop changing parts
of the spec/design so people can have a stable environment. The decision
was to avoid changing things that are covered in TDPL as much as possible.
Is it possible to change? Yes. But you will have to convince Andrei and
Walter, and really, this is a naming issue. It's not tantamount to the
language's functionality.
You are more likely to see the clear function in std.container change.
-Steve
More information about the Digitalmars-d
mailing list