-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposal: Radical simplification of the C# syntax #13731
Comments
This is a dupe of #2974, which has already been closed because it's a ridiculously silly idea. C# is not, nor will it ever be, a whitespace sensitive language. It was not designed as such. So braces and semi-colons remain necessary to disambiguate the syntax. If you want Python syntax on the CLR feel free to use IronPython. There's no reason to morph the C# compiler into compiling the grammar from other arbitrary languages. |
Of course C# will never be a whitespace sensitive language! The C# compiler remains as is. There would be a new D# compiler. This is a proposal for a new language called D# with similar semantics as C# (you can reuse all your C# knowledge!). Is it really silly to provide the same power, but with a much simpler syntax? |
What does that have to do with this repo, then? Roslyn is specifically C# and VB.NET compilers. It's not generalized for other language implementations. You're free to fork Roslyn and modify the C# parser.
In my opinion, yes. Whitespace sensitivity isn't simpler, it's just different. To have duplicity of functionality with only a difference in grammar sounds terribly redundant. There are already numerous CLR languages that are whitespace sensitive. |
switch to VB. There are much less braces and none semicolons. Despite more keywords, paradoxically there is less to type, because editor autogenerate most of them. |
F# is whitespace significant and has a "simplified" syntax to an extent that seem like it infers program logic from developer's feelings. |
@OJacot-Descombes Great idea. Can you please create a dedicated github repo for its development? |
Does someone know how to create a new repo for d-sharp as clone of C# roslyn? It should not be a fork, as the future work should not interfere with the existing C# compiler. |
Pretty sure someone could write a plugin for VS supporting |
The result looks like svick/roslyn-not-a-fork (compare with svick/roslyn, which is a fork). |
Since a lot of work has to be done before we can start to write a compiler (of course based on the C#/Roslyn compiler) I created an empty repository here. Let's continue the discussion and development of D# (D-Sharp) there. |
Discussion redirected to OJacot-Descombes/dsharp#1 |
Well, that would be a new language of course. But a language with essentially the same semantics as C#. Let's call it D# (D-Sharp). Why: save typing, remove visual noise.
Instead of writing (C#):
we would write (D#):
The syntax would be line-oriented with smart line continuation. Blocks would solely be defined by indentation (as in python).
Of course there is a lot more to be nailed down, but this is only the starting point for a discussion. What do you think of it?
The text was updated successfully, but these errors were encountered: