dotnet / roslyn

The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
https://docs.microsoft.com/dotnet/csharp/roslyn-sdk/
MIT License
19.06k stars 4.04k forks source link

It's time to create a new awesome programming language #23785

Closed asydneylover closed 5 years ago

asydneylover commented 6 years ago

Other platforms has already created their own new programming languages such as Rust, Golang, Swift, Kotlin. On the JVM, Kotlin seems to replace Java with it new modern syntax. People seems to very impressed with Golang by its native support for concurrency. Should we consider to create new programming language?

ghost commented 6 years ago

I don't think that methods which are virtual by default is a good idea. I understand "virtual" keyword as a promise to someone who inherits from my class that I understand all consequences and allow them to override the method. Giving this promise by default seems just wrong for me.

If I would design new language now I would make classes sealed by default, methods nonvirtual by default and types non-nullable by default. I would also rename interfaces to functional class, allow multiple inheritance and forbid fields in functional class. Multiple inheritance on regular classes would be still forbidden.

I think that everyone thinks of "ideal language" which would fulfill their ideal completely. Currently there are C# , F#, VB and Q#. I think that these languages are great and there is no need for another language.

Emzi0767 commented 6 years ago

Kotlin was created to fix Java problems, which are, for the most part, not present in C#. Or put in other words, let JVM catch up to 2017.

Aside from that, creating a language is no easy task. Plus why create one when there's a number of perfectly fine languages available in .NET ecosystem already?

HaloFour commented 6 years ago

Microsoft already has more than a half-dozen available and supported languages that target the CLR and can interop with one another. There is a further ecosystem of many other languages, ranging from general purpose to esoteric. There are all kinds of languages that meet many (if not all) of your stated goals.

CyrusNajmabadi commented 6 years ago

Remove all the existing features of C# that are not widely used by developers (look at how Golang's team keep consider carefully when adding any new features)

Which are these features?

yaakov-h commented 6 years ago

Emphasize on the ability to compile to Web Assembly

I thought corert is working on this already?

Neme12 commented 6 years ago

No.

More modern and concise syntax, for example no semi-colon, put type after variable's name, put return type after method's name etc. (looking at Swift, Kotlin, or even TypeScript)

How is

var x: string;

more consise than

string x;

?

Class / method is open by default (similar to Java).

No. This is by design.

Remove all the existing features of C# that are not widely used

which features?

Emphasize on the ability to compile to Web Assembly

why does that require a new language?

omidkrad commented 6 years ago

I'd like to see some features of F# (like Units of Measure), GoLang (like Coroutines) and EcmaScript (like native JSON support) in C#, but not looking for a new programming language.

JeroMiya commented 5 years ago

@Neme12 The variable-name-first-then-type declaration style is not intended to be more concise but to provide other benefits:

All that being said, I'd recommend closing this issue as off topic. I'd rather the Roslyn team focused on the language it was built for rather than refactoring it to be a general purpose language compiler framework. Though, you could always parse your own language and transpile it into

sharwell commented 5 years ago

This is the repository for the C# and VB language implementations. A new language which is not C# or VB would by its very nature not be C# or VB, and thus wouldn't belong in this repository. 😄