Live data from Hacker News

G# – A modern .NET language with Go, Kotlin, and Swift ergonomics

davidobando.github.io

31–40 of 107 posts

Re: G# – A modern .NET language with Go, Kotlin, and Swift ergonomics

#31
post #9

How is this different than C#? What new concepts does this bring that C# doesn't? 20 years ago there was some momentum behind Visual Basic .Net; but the language was so similar to C# that it just wasn't worth using. There was a joke that .Net was a "skinnable language." BTW, there's a whole nitpicky/semantic argument that C# isn't null safe because of the null forgiving operator. That will probably come into play wit…

The momentum behind VB.NET was mainly because most enterprises using VB6 assumed it was the natural replacement.

Re: G# – A modern .NET language with Go, Kotlin, and Swift ergonomics

#32
post #9

How is this different than C#? What new concepts does this bring that C# doesn't? 20 years ago there was some momentum behind Visual Basic .Net; but the language was so similar to C# that it just wasn't worth using. There was a joke that .Net was a "skinnable language." BTW, there's a whole nitpicky/semantic argument that C# isn't null safe because of the null forgiving operator. That will probably come into play wit…

The momentum behind VB.NET was mainly because most enterprises using VB6 assumed it was the natural replacement.

Your humble opinion? Nobody likes giving up what they know.. Perl, Python, Ruby, VB6 (can be moved to c#), Pascal (still relevant)

Re: G# – A modern .NET language with Go, Kotlin, and Swift ergonomics

#33
- stupid question: how do you make a programming language like this from scratch?

- what is the thought process that goes into making a programming language

- what is this field of study or discipline called?

- why do we have so many programming languages? what purpose do they intend to solve and how do we know what purpose a programming language was made for?

- for example, why was swift made if objective c exists and why was objective c made if c++ exists?

Re: G# – A modern .NET language with Go, Kotlin, and Swift ergonomics

#35
post #21

Yuck. I like both Go and C# a lot, and use them both professionally. In my experience the strengths of Go are mostly - Deployability via single-file static binaries - Simple syntax that anyone can learn (no exceptions, no classes or inheritance) - Wicked fast compile times And the strengths of C# are - Powerful language with null-safety and lots of syntax sugar - Runtime-level coroutines so you don't need `async/awai…

C# has single-file static binaries

Re: G# – A modern .NET language with Go, Kotlin, and Swift ergonomics

#36

- stupid question: how do you make a programming language like this from scratch? - what is the thought process that goes into making a programming language - what is this field of study or discipline called? - why do we have so many programming languages? what purpose do they intend to solve and how do we know what purpose a programming language was made for? - for example, why was swift made if objective c exists a…

When I was in university the course was called compiler construction. Making a language like G# is very simple and about the level that the final project of the course would be if the team was working together really well and went for maximum bonus points.

We have so many programming languages because it's a fun and relatively easy thing to start, and lots of people have differing opinions of how it should be done. Also making a programming language seems like a difficult thing from the outside so it has a certain allure.

Swift exists because objective c has archaic language design that modern developers reject. Objective C exists because as far as I know at the time smalltalk style object oriented programming was hip and C++ made the wrong decisions in their eyes. It could also be that C++ wasn't popular enough yet at that point for Apple to commit to it. In that period basically all major operating systems went different ways. The Unix derivatives went all in on plain C, Microsoft went C++ and Apple objective c, though I think OSX itself is plain C for the most part.

Re: G# – A modern .NET language with Go, Kotlin, and Swift ergonomics

#37

- stupid question: how do you make a programming language like this from scratch? - what is the thought process that goes into making a programming language - what is this field of study or discipline called? - why do we have so many programming languages? what purpose do they intend to solve and how do we know what purpose a programming language was made for? - for example, why was swift made if objective c exists a…

- it's easy to prompt an LLM to do it for you, especially if you're targeting a pre-existing runtime like CLR or transpiling to another language. previously you'd have to grind out the parser and compiler for a new language, but a lot of that work is mechanical

- "I want a language that works a little differently"

- programming language theory (PLT), generally

- languages are tools. the authors should explain what their languages are best suited for

- Obj C and C++ were both developed around the same time as extensions of C. Obj C was focused on message passing and Smalltalk's object system, while C++ was focused on adding as many abstractions as possible to C. Neither language has good support for avoiding null pointer dereferences, one of the primary things Swift addresses with its richer type system and Optionals.

Re: G# – A modern .NET language with Go, Kotlin, and Swift ergonomics

#38

- stupid question: how do you make a programming language like this from scratch? - what is the thought process that goes into making a programming language - what is this field of study or discipline called? - why do we have so many programming languages? what purpose do they intend to solve and how do we know what purpose a programming language was made for? - for example, why was swift made if objective c exists a…

For your first two questions, I can't recommend Crafting Interpreters enough, it's probably one of the best entry-level books that goes into that entire process.

https://craftinginterpreters.com/

Re: G# – A modern .NET language with Go, Kotlin, and Swift ergonomics

#39
post #21

Yuck. I like both Go and C# a lot, and use them both professionally. In my experience the strengths of Go are mostly - Deployability via single-file static binaries - Simple syntax that anyone can learn (no exceptions, no classes or inheritance) - Wicked fast compile times And the strengths of C# are - Powerful language with null-safety and lots of syntax sugar - Runtime-level coroutines so you don't need `async/awai…

C# has single-file static binaries

Exactly. To add to this, is called ahead-of-time compilation, and bundles required parts of the .net runtime into the single-binary. Deployment targets thus don't need to ship any .net environment or libraries.

Re: G# – A modern .NET language with Go, Kotlin, and Swift ergonomics

#40

- stupid question: how do you make a programming language like this from scratch? - what is the thought process that goes into making a programming language - what is this field of study or discipline called? - why do we have so many programming languages? what purpose do they intend to solve and how do we know what purpose a programming language was made for? - for example, why was swift made if objective c exists a…

Making new programming languages is something a lot of people do for fun, and it's also covered in most CS degrees too, albeit briefly.

We have so many programming languages because they tend to have a particular niche in which they're useful. Many languages are still in use even though they're very old (C, FORTRAN, COBOL), and others just keep getting updated over time and have a large userbase (Java, Perl, Ruby, Python).

99.99% of all new programming languages never get a critical mass of users. People create a new language to learn something, and they're the only user. e.g. I've written a few FORTHs, have spent the past few weeks on writing a lisp compiler, and in the past wrote BASIC interpeters for fun.

If you want to make your own "crafting interpreters" is a good read:

https://craftinginterpreters.com/contents.html

But there are a million other tutorials on writing a simple lexer/parser/interpreter/compiler, and a lot of academic literature (e.g. The Dragon Book).

Post reply on HN