Allow creation of static arrays with new#5688
Conversation
|
This seems like a bad idea as long as we don't support |
|
The problem is that different things will happen for |
|
@yebblies I am not unaware of the problem. For generic code though, it's ridiculous to have to special-case static arrays. |
|
@Biotronic : The correct approach IMO would be to correctly deprecate |
|
Perhaps a DIP explaining the pros and cons? I agree with others that having an alias behave differently from a non-alias is surprising behavior and is the addition of another special case corner in the language. This should not be done lightly. |
|
I'd be in favour of deprecating I second the motion for a DIP and marking this as blocked until a decision is made. |
@Biotronic in case you missed it. Since a couple of weeks there is a new DIP process in place - see also this blog post about it. How about going through it, working out a DIP and making a change? :) |
|
It doesn't look like this PR has a future. Alternatives seem to be preferred, and those alternatives will need a DIP and a different PR. I suggest this be closed; any objections? |
Agreed. |
Related to https://issues.dlang.org/show_bug.cgi?id=10879 and thus dlang/phobos#4204.
This PR simply allows the following code, which was previously illegal:
This code used to give the error "new can only create structs, dynamic arrays or class objects, not int[10]'s".