Simple question is: Do Unity have plans to support C# 8. If they Do - When?
Yes, we do plan to support C# 8. We don’t have a release date yet, although I expect our support for it will lag a bit behind Microsoft’s.
I doubt C# 8 itself has a release date yet.
Ok it is good thanks
Really I have just looking for undated roslyn compiler with support of C#8 so we can enable C#8 through csc.rsp and have benefits of NullableReference warnings in our project
You can play with the project I uploaded a while ago: Would the Roslyn Compiler compile C# 8.0 preview?
It has Roslyn C# 8.0 Preview compiler integrated. If there is a version of Roslyn newer than 2.11.0.63519, I believe, you can just replace the whole Roslyn folder there with the new version.
Thanks @alexzzzz I will try it
Any update on the release date for C# 8 support?
Likely sometime in the 2020 release cycle.
Update: C# 8 is released now, i personally need native json support
https://github.com/dotnet/corefx/issues/33115
Cool.
Waiting for Nullables support
I have event prepare command to make nullables warnings to be errors
How’s it looking with C# 8 in Unity, any chance it will come with 2019.3?
No, as mentioned above, it will be in the 2020 release cycle at the earliest. We don’t currently have an ETA, so it might be later.
May be you have plans to update C# compiler to latest released so we can adlast turn on some syntactic sugar without true support of new features?
+1 on this, since after c#8, default interface methods are supported.
+1, static extensions and default interface implementations are sweet
+1
I don’t think static extensions are part of C# 8.
But I’m waiting for default interface implementation and some minor things like readonly members and unmanaged constructed types might fit very well into DOTS.
+5 million
simple ‘using’ statements
switch expressions
And a personal favorite;
this:
int[] array = { 1, 3, 5, 7, 9 };
int i = array[^1]; // returns 9
int[] subArray = array[1..3]; // returns { 3, 5 }
int[] subArray2 = array[^2..]; // returns { 7, 9 }
array[1…3] should return 2 elements.
More than c# 8 I need .net standard 2.1 support (fast span). is there a plan for that or will they potentially come together?
Fast span is pretty important for working with memory in cache friendly ways.