Live data from Hacker News

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

youtube.com

91–100 of 162 posts

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

#91

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 l…

I can't say for sure because I don't know the full situation, but I've heard a similar story a few times and IMNSHO looking at it as "they made the wrong choice initially" is off because it assumes that a C# team could have delivered the initial version in the timeline required to get to the the next level of project.

If they had a team that knows nest and can iterate fast with it that's the perfect choice. I've worked at multiple agencies over the years and was mostly in C# teams. Whenever a C# team got on greenfield/startup projects it ended up being a shit-show of self inflicted slowdowns/over-complications. I've seen 3 projects where in large part due to slow development of the MVP the project missed investment window or ran out of funds.

From my experience Node/Rails teams were much more capable of delivering shit that works. It would eventually have a bunch of problems that would be non issues by default on a different stack like ASP.NET, but the difficulty of getting to that point and realizing that just being in that situation is a win is what most engineers miss.

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

#92
post #75

Earlier quoted context omitted.

See Android, or Meadows for alternative reality.

Android still runs on a monolithic kernel written in a memory-unsafe language. I'm finding it suprisingly difficult to find information on Meadow, other than it runs .NET DLLs as user-space applications, but nothing about the structure of the kernel. Longhorn was going to be more than that. Microsoft did have Singularity/Midori projects, started around the middle of Longhorn/Vista, and continued much longer after Vis…

Microsoft wasn't even able to deliver that, which was my whole point.

Joe Duffy mentions on a talk, that even with Midori running production workloads, Windows team could not be changed their mind.

Meadow uses a C++ based microkernel, the whole userspace is based on .NET, by the way.

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

#93

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

Technically you're also allowed to use anonymously typed objects as inferred generic typed parameters in method calls.

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

#94

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 l…

I can't say for sure because I don't know the full situation, but I've heard a similar story a few times and IMNSHO looking at it as "they made the wrong choice initially" is off because it assumes that a C# team could have delivered the initial version in the timeline required to get to the the next level of project. If they had a team that knows nest and can iterate fast with it that's the perfect choice. I've work…

Same experience here. C# might have superior tooling, performance, whatever but the OOP baggage is too heavy. In theory you can write something else than a giant over-complicated, over-abstracted pile of OOP nonsense in C#, but every team I've seen has.

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

#95

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 l…

I assume the startup wasn't also leveraging typescript heavily on the frontend, that tends to shift the weight in its favor. Having one set of tools to use across everything, being able to share logic and types without needing to go through lossy translation layers, and giving (especially small) teams better flexibility to move people around is a huge benefit.

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

#96

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…

What you are describing is structural types. It is indeed a mystery that these are so under used, especially as they are a cornerstone of type theory. Structural types are so useful that they creep into most languages in some way. Even in Java, the Kingdom of the Nouns, where the rulers refused to merge a pair class, functions essentially take tuple arguments and these tuples don't have to be named and defined. You c…

By now I'm also convinced that structural typing is a better default. Nominal types are still useful to assign properties that are hard or impossible to encode with structure alone (e.g. string that is a valid email address) . But I haven't encountered any other examples yet, where I'm missing nominal types.

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

#97
post #78

The real history of C# is that it is a rip off of Java. Anders / Microsoft understandably doesn't want to acknowledge that, but the rest of us can. C# today has diverged from Java, but the original release was Java with a few features added, such as properties, delegates, structs and unchecked exceptions. That last one was a mistake, see https://mckoder.medium.com/the-achilles-heel-of-c-why-its-ex...

Checked exceptions are bad because people just catch them and rethrow RuntimeException. Proper errors as data would be much preferable.

Checked exceptions are proper errors as data. There is no difference between Result[T, E] and T throws E. The same people that just rethrow as RuntimeException would call unwrap() on Result and panic. The main problem with _Java_'s implementation of checked exceptions is that they're not fully in the type system because of Java's weak type system. That is solvable with a strong type system though, like in Scala or Swift.

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

#98

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.

I want something that will bring productivity of Delphi to Web. May be I am old now, but I could have built applications in a weekend in Access or Visual Basic that will take weeks now in latest web stack.

Right? I was hoping webassembly would bring back some proper gui tools like this to avoid the whole JS/DOM but no luck so far.

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

#99

The real history of C# is that it is a rip off of Java. Anders / Microsoft understandably doesn't want to acknowledge that, but the rest of us can. C# today has diverged from Java, but the original release was Java with a few features added, such as properties, delegates, structs and unchecked exceptions. That last one was a mistake, see https://mckoder.medium.com/the-achilles-heel-of-c-why-its-ex...

MS poached him (and was even sued for it - that's how egregious it was) to create a Java killer because they had issues with Java.

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

#100

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.

You don't have to use all the features of C#. I make my living at it and don't touch a lot of them. The issue with C# is culture. They went full in on blog driven development so there's way too many people who will yell this is the way to do things this week.
Post reply on HN