Re: Another init() bug, can we deprecate yet?

2015-01-08 Thread Peter Alexander via Digitalmars-d
On Wednesday, 7 January 2015 at 23:31:30 UTC, H. S. Teoh via 
Digitalmars-d wrote:
On Wed, Jan 07, 2015 at 10:03:00PM +, Peter Alexander via 
Digitalmars-d wrote:

https://issues.dlang.org/show_bug.cgi?id=13806

For the lazy: BitArray has an init() method, which hides the 
property

BitArray.init

This, or something similar, appears every few months. Walter 
has said
in the past that the ability to override init is a feature. As 
far as
I can tell, no one is using it as a feature; it only seems to 
cause

trouble.

Can we just deprecate it? At the very least deprecate 
functions named

init().


https://github.com/D-Programming-Language/phobos/pull/2854

Destroy!


Thanks. Just to be clear, I'm advocating deprecating all 
user-defined init functions, not just BitArray (so we don't get 
into this situation again).




Re: Another init() bug, can we deprecate yet?

2015-01-08 Thread H. S. Teoh via Digitalmars-d
On Thu, Jan 08, 2015 at 09:46:16AM +, Peter Alexander via Digitalmars-d 
wrote:
 On Wednesday, 7 January 2015 at 23:31:30 UTC, H. S. Teoh via Digitalmars-d
 wrote:
 On Wed, Jan 07, 2015 at 10:03:00PM +, Peter Alexander via
 Digitalmars-d wrote:
 https://issues.dlang.org/show_bug.cgi?id=13806
 
 For the lazy: BitArray has an init() method, which hides the
 property BitArray.init
 
 This, or something similar, appears every few months. Walter has
 said in the past that the ability to override init is a feature. As
 far as I can tell, no one is using it as a feature; it only seems to
 cause trouble.
 
 Can we just deprecate it? At the very least deprecate functions
 named init().
 
 https://github.com/D-Programming-Language/phobos/pull/2854
 
 Destroy!
 
 Thanks. Just to be clear, I'm advocating deprecating all user-defined
 init functions, not just BitArray (so we don't get into this situation
 again).

Yes, but purging it from Phobos first is a first step towards that
eventual goal. :-)


T

-- 
Береги платье снову, а здоровье смолоду. 


Re: Another init() bug, can we deprecate yet?

2015-01-07 Thread H. S. Teoh via Digitalmars-d
On Wed, Jan 07, 2015 at 10:03:00PM +, Peter Alexander via Digitalmars-d 
wrote:
 https://issues.dlang.org/show_bug.cgi?id=13806
 
 For the lazy: BitArray has an init() method, which hides the property
 BitArray.init
 
 This, or something similar, appears every few months. Walter has said
 in the past that the ability to override init is a feature. As far as
 I can tell, no one is using it as a feature; it only seems to cause
 trouble.
 
 Can we just deprecate it? At the very least deprecate functions named
 init().

https://github.com/D-Programming-Language/phobos/pull/2854

Destroy!


T

-- 
You have to expect the unexpected. -- RL


Re: Another init() bug, can we deprecate yet?

2015-01-07 Thread Brian Schott via Digitalmars-d
On Wednesday, 7 January 2015 at 22:03:01 UTC, Peter Alexander 
wrote:
Can we just deprecate it? At the very least deprecate functions 
named init().


There's a check for that:

https://github.com/Hackerpilot/Dscanner/blob/master/src/analysis/builtin_property_names.d


Another init() bug, can we deprecate yet?

2015-01-07 Thread Peter Alexander via Digitalmars-d

https://issues.dlang.org/show_bug.cgi?id=13806

For the lazy: BitArray has an init() method, which hides the 
property BitArray.init


This, or something similar, appears every few months. Walter has 
said in the past that the ability to override init is a feature. 
As far as I can tell, no one is using it as a feature; it only 
seems to cause trouble.


Can we just deprecate it? At the very least deprecate functions 
named init().