Expression 2: Add @feature directive for enabling backwards-uncompatible features, replace @strict with @feature edition1
#2914
Replies: 3 comments 4 replies
-
|
Vurv will probably say to move this to discussions but I think his intent was to add a |
Beta Was this translation helpful? Give feedback.
-
|
|
Beta Was this translation helpful? Give feedback.
-
|
So first Also the simple answer: if you don't want to maintain your E2s, don't use |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Wiremod updates have broken my chips fairly often, and it affected other players whom I gave my chips to.
I propose to disable new backwards-uncompatible changes unless they is enabled by
@featuredirectiveand to stop adding new backwards-uncompatible changes enabled by
@strict.@featuresyntax and functionality"Features" are used to enable backwards-uncompatibe features.
Feature F may require other features A and B to function, in this case enabling F enables A and B.
You can explicitly disable feature A. If other features F and G require it, they are disabled too.
Except features with "latest" in name, no feature should ever be changed in way that break existing code, except on language edition deprecation.
@feature latestrequires all the features available now.@feature disable_deprecated_latestdisallow usage of everything deprecatedLanguage edition features
I suppose it would be impractical to list all the features your chip uses.
To simplify, I suggest to add "edition"/"milestone"/?? features.
They add nothing by their own, but they enable other features.
I suggest deprecation of
@strictin favour of@feature edition1.Future features plus edition1 will form
@feature edition2, and so on.Maybe some features will never be added to an edition.
Language edition deprecation
If technical debt is too big, older
@editions and features they require may be removed completely.It is supposed to be rare event.
Example features
@feature disable_returnless_functionsthat disallowsfunction number example() { print("no return") }@feature disable_function_redifinitionthat causes Expression 2: function predefinition is broken #2910@feature disable_deprecated_before_edition1that disallows usage of anything deprecated before edition1@feature swap_logical_short_circuit_opsthat makes||a short-circuiting operation and|a non-short-circuiting one.Beta Was this translation helpful? Give feedback.
All reactions