Why is this allowed

H. S. Teoh hsteoh at quickfur.ath.cx
Tue Jun 30 18:22:41 UTC 2020


On Tue, Jun 30, 2020 at 02:06:13PM -0400, Steven Schveighoffer via Digitalmars-d-learn wrote:
> On 6/30/20 12:37 PM, Steven Schveighoffer wrote:
[...]
> I take it back, I didn't realize this wasn't something that happened
> with dynamic arrays:
> 
> int[] dyn = [1, 2, 3];
> 
> dyn = 5; // error
> dyn[] = 5; // ok, brackets required
> 
> I would say that's a decent precedent to deprecate and remove that
> functionality.
[...]

Could you add this info to the bugzilla issue as additional evidence
that this (mis)feature should be removed?

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


T

-- 
"640K ought to be enough" -- Bill G. (allegedly), 1984. "The Internet is not a primary goal for PC usage" -- Bill G., 1995. "Linux has no impact on Microsoft's strategy" -- Bill G., 1999.


More information about the Digitalmars-d-learn mailing list