Metasyntactic
Metasyntactic
CC#
Created by knut.wannheden on 5/16/2024 in #help
Definitive C# language reference?
No description
22 replies
CC#
Created by knut.wannheden on 5/16/2024 in #help
Definitive C# language reference?
22 replies
CC#
Created by knut.wannheden on 5/16/2024 in #help
Definitive C# language reference?
the g4 grammar in roslyn is accurate here
22 replies
CC#
Created by knut.wannheden on 5/16/2024 in #help
Definitive C# language reference?
I found one case where I am wondering about the correctness. As you can see in the screenshot a using directive can either occur near the beginning of a compilation unit or inside a namespace body. But I think this doesn't account for the fact that the body of a file-scoped namespace declaration doesn't have any curly braces and instead has a semicolon.
22 replies
CC#
Created by knut.wannheden on 5/16/2024 in #help
Definitive C# language reference?
No description
22 replies
CC#
Created by knut.wannheden on 5/16/2024 in #help
Definitive C# language reference?
You'd need to write up teh impls of these:
22 replies
CC#
Created by knut.wannheden on 5/16/2024 in #help
Definitive C# language reference?
like the rule for a raw-string-literal (which is difficult since it involves counting quoets on both ends)
22 replies
CC#
Created by knut.wannheden on 5/16/2024 in #help
Definitive C# language reference?
(i think it's missing 1-2)
22 replies
CC#
Created by knut.wannheden on 5/16/2024 in #help
Definitive C# language reference?
but i think it doesn'thave 100% of all grammar rules
22 replies
CC#
Created by knut.wannheden on 5/16/2024 in #help
Definitive C# language reference?
100% of the rules in it are accurate.
22 replies
CC#
Created by knut.wannheden on 5/16/2024 in #help
Definitive C# language reference?
let me rephrase
22 replies
CC#
Created by knut.wannheden on 5/16/2024 in #help
Definitive C# language reference?
but that doesn't mean you can make a parser from it.
22 replies
CC#
Created by knut.wannheden on 5/16/2024 in #help
Definitive C# language reference?
it's fully conformant to the language stnadard 🙂
22 replies
CC#
Created by Tony Wang on 4/19/2024 in #help
C# IEnumerable ToArray() Benchmark
it's not easy, as yo uhave to know precisely how every operation works. you can't make any assumptions her.e remember that you might run on any runtime, with any impl of any type that doesn't whatever it wants.
48 replies
CC#
Created by Tony Wang on 4/19/2024 in #help
C# IEnumerable ToArray() Benchmark
The runtime would need to cheaply be able to track aliasing somehow.
48 replies
CC#
Created by Tony Wang on 4/19/2024 in #help
C# IEnumerable ToArray() Benchmark
It's not just ToArray, it's everything involved. It would need to know that there was no aliasingg at all and that this was a fresh copy itself, and that the copy being requested was exactly the same, (including variance) etc.
48 replies
CC#
Created by Tony Wang on 4/19/2024 in #help
C# IEnumerable ToArray() Benchmark
No. Because it would have to know how the array type itself worked.
48 replies
CC#
Created by Tony Wang on 4/19/2024 in #help
C# IEnumerable ToArray() Benchmark
The there could be impls that, for example, stored the last few arrays into static variables somewhere. And this difference would be observable.
48 replies
CC#
Created by Tony Wang on 4/19/2024 in #help
C# IEnumerable ToArray() Benchmark
The just will not remove the check. It would have to know somehow that the array isn't being held onto anywhere (aliased)
48 replies
CC#
Created by alkasel#159 on 2/14/2024 in #help
Visual Studio: user frustrated by auto-completion
@alkasel#159 please file issue at github.com/dotnet/roslyn. Please give an example of what you wrote, and what happened. Ideally with screenshots. Thanks 🙂
18 replies