Fix Issue 18604 - in parameter storage class should be deprecated#8021
Fix Issue 18604 - in parameter storage class should be deprecated#8021wilzbach wants to merge 1 commit intodlang:masterfrom
Conversation
|
Oh god no. This will cause massive pain for user and bring very little benefit. |
|
This just occurred to me: why is it required to create a DIP when adding new things to the language, but when removing it’s fine by just submitting a PR and hope someone will merge it? |
Because DIPs are currently meant to die and have a very high chance of just going into oblivion without achieving anything. In the last ten months no DIP was neither approved nor rejected, in the meanwhile ~2500 PR have been merged.
I opened this to start a discussion. It would obviously require more work. |
Most of the recent big deprecations/removals have been in the queue for years now.
With the escape analysis that Walter is implementing, surely the path of least resistance is just to turn on scope. Something akin to I could even try this in gdc to give you an idea of what may break (or not) in an aggressive optimizer. Telling people that their I can only see this as a negative change. |
|
Honestly, I hate As such, I'd love for IMHO, if we really want to get rid of Phobos is not |
|
|
incurrently just meansconsteven though it was supposed to meanscope const. This makes it redundant and confusing and should be deprecated. Maybe after it has been deprecated and been an error for one version, it can be re-introduced with the proper meaning, but for now it should definitely trigger a deprecation warning.dlang/druntime#2139 (comment)
https://dlang.org/spec/function.html#parameters
This change is rather trivial, but requires
s/in /const /(or betters/in /scope const/) for druntime and Phobos.As most of the work here is updating druntime, Phobos and the testsuite, I would only do so if there's a consensus that we can't fix
in.