Live data from Hacker News

The history of C# and TypeScript with Anders Hejlsberg [video]

youtube.com

61–70 of 162 posts

Re: The history of C# and TypeScript with Anders Hejlsberg [video]

#61

We need Anders to make one final language. A MINIMAL memory safe language. The less it has the better. Rust without the crazy town complexity. The distilled wisdom from C# and Delphi and TypeScript. A programming language that has less instead of more.

>We need Anders to make one final language. I do feel like there is a gap for a modern compiled, functional and garbage collected language. Go isn't it because it lacks the functional constructs. C# and Java aren't it because they depend on a VM. Rust isn't it because of its difficult memory management. Swift isn't it because it is so tied to Apple and their platforms.

Roc might be that language one day. Not yet because it's pre-0.1.

Re: The history of C# and TypeScript with Anders Hejlsberg [video]

#62
post #34

Surprising to me that (in the context of TypeScript) ECMAScript 4, ActionScript, and Google Closure were not mentioned! Especially the first two; Macromedia/Adobe and Netscape/Mozilla have been working on baking TypeScript into JavaScript proper for a whole decade before HTML5, the mobile boom, and the associated problems have emerged. ES4/AS3 even had a nearly identical syntax. What's even more interesting is that M…

[deleted]

Re: The history of C# and TypeScript with Anders Hejlsberg [video]

#63
post #53

We need Anders to make one final language. A MINIMAL memory safe language. The less it has the better. Rust without the crazy town complexity. The distilled wisdom from C# and Delphi and TypeScript. A programming language that has less instead of more.

On the .Net VM you’re describing F#, mostly by virtue of being based on OCaml. Contrasted with TypeScript and C#, F# is smaller, more expressive, stricter, with mature pattern matching and type resolution baked in from the ground up. F# was years ahead of the major languages on what are increasingly looking like ‘the basics’ around ADTs and immutability in modern distributed computing. OCaml and F# capture the lingui…

It’s a great language. I just wish its compilation speed matched that of OCaml.

Re: The history of C# and TypeScript with Anders Hejlsberg [video]

#64
post #54
post #32

Earlier quoted context omitted.

What you are looking for is called F#. You get native interop with C# and access to all .NET/C# libraries as a bonus. We use it as a daily driver for a complex B2B2C cloud platform.

Does it not run in a VM?

Yes you are right, it does not properly support NativeAOT yet.

But it isn't a need for most use cases, unless you want to do mobile development and meet app store policies. But even then, mature F# frameworks like Fable transpile your F# code to React & Cie.

Re: The history of C# and TypeScript with Anders Hejlsberg [video]

#65
post #54
post #32

Earlier quoted context omitted.

What you are looking for is called F#. You get native interop with C# and access to all .NET/C# libraries as a bonus. We use it as a daily driver for a complex B2B2C cloud platform.

Does it not run in a VM?

It can be compiled, but that’s not the use case it was originally designed around, so it’s not quite as first class an experience as with Go or Rust.

Re: The history of C# and TypeScript with Anders Hejlsberg [video]

#66
I started my career doing ~20 years of C# from pretty much the very beginning (JavaScript even before then!).

Around 2020, I switched into the startup space and quickly picked up TypeScript since that's "what the kids use". It wasn't without struggles, but once I wrapped my head around TypeScript as "shapes for JavaScript", it clicked.

At the time, the startup was undertaking a new product built on Nest.js[0] which looked awfully similar to ASP.NET web APIs which had the benefit of being much more mature, complete, and with one of the best ORMs (EF Core). I suggested it to the team and was a bit shocked by the pushback.

It ultimately inspired me to do a bunch of writing [1][2] on just how similar these two languages are and how they've converged on syntax (no doubt owing to Anders at the helm). Of course, they ultimately still have quite a bit of a gap, but for teams that are working in TS and finding that they are outgrowing it, C# is a very natural choice.

I left that startup after a short stint, but boomeranged almost 3 years later. Company went from seed to series C in that time. End of last year, we started the migration from TypeScript on the backend to C# on the backend and haven't looked back. The toolchain is far simpler and stable, the "default" ORM is far more flexible and powerful, the more rigorous type chain seems more conducive for agent-driven coding. Team adapted relatively quickly within ~4 weeks.

[0] https://nestjs.com/

[1] https://typescript-is-like-csharp.chrlschn.dev/

[2] https://itnext.io/getting-functional-with-c-6c74bf279616

Re: The history of C# and TypeScript with Anders Hejlsberg [video]

#67

I don't know that many languages but, having been writing lots of typescript in the last 3 years there are so many things I love about it. It infers types. If I do const data = [ { name: 'bob', age: 35, state: 'CA' }, { name: 'jill', age: 37, state: 'MA' }, { name: 'sam', age: 23, state: 'NY' }, ]; Typescript knows data is an array of { name: string, age: number, state: string }. I don't have to tell it. Further, if…

Not surprisingly, C# worlds the same way with the only exception that you have to declare the variables as “var” but they are still strongly typed

Re: The history of C# and TypeScript with Anders Hejlsberg [video]

#68

We need Anders to make one final language. A MINIMAL memory safe language. The less it has the better. Rust without the crazy town complexity. The distilled wisdom from C# and Delphi and TypeScript. A programming language that has less instead of more.

>We need Anders to make one final language. I do feel like there is a gap for a modern compiled, functional and garbage collected language. Go isn't it because it lacks the functional constructs. C# and Java aren't it because they depend on a VM. Rust isn't it because of its difficult memory management. Swift isn't it because it is so tied to Apple and their platforms.

C#, with default tooling, can compile without needing a VM, for windows, macOS, linux and some other platforms.

Re: The history of C# and TypeScript with Anders Hejlsberg [video]

#70

Earlier quoted context omitted.

>We need Anders to make one final language. I do feel like there is a gap for a modern compiled, functional and garbage collected language. Go isn't it because it lacks the functional constructs. C# and Java aren't it because they depend on a VM. Rust isn't it because of its difficult memory management. Swift isn't it because it is so tied to Apple and their platforms.

C#, with default tooling, can compile without needing a VM, for windows, macOS, linux and some other platforms.

I wish that Nuget would show which packages are NativeAOT compatible.
Post reply on HN