bump langversion to 7.3 #21
No reviewers
Labels
No labels
IN TESTING
Priority: HIGH
Priority: LOW
Priority: MEDIUM
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
investigating
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
BorderOfExtacy/BOEPassion!21
Loading…
Reference in a new issue
No description provided.
Delete branch "tidgp/BOEPassion:csharp7"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
currently
LangVersion, which controls what c# language features the compiler will recognize, is set to 2. this is pretty restrictive for no real advantage. for a project targettingnet20like this, the default is all the way up at the maximum of 7.3; this pr sets that explicitly for clarity.afaik this isn't unusual in ts3 modding; e.g. the modthesims.info guide leaves langversion up at the default 7.3.
this would bring in the ability to use most of 12 years worth of nice improvements to c# without any breaking changes.
a big w is interpolated strings replacing String.Format.
also nice are pattern matching, null-conditional, local functions, expression-body.
of course, some features that would be nice to have like Enum.TryParse just aren't in the DLLs or otherwise depend on runtime support. but a surprising amount are syntactic sugar and disappear after compile-time, so they don't care how old the runtime is.
for the sake of not making the code more schizo i intend to only use the new features in new code in new or rewritten files
some more c# 7.3 showcase