8 ms·
The history of C# and TypeScript with Anders Hejlsberg [video]
- andrewstuart 9mo agoWe 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.
- vaylian 9mo agoSounds like golang to me
- andrewstuart 9mo agoWithout the features I identified,yes, you’re right!
- steve1977 9mo agoConsidering they used Go for the native compiler he might actually agree with you.
- LarsKrimi 9mo agoOberon 07?
- appsoftware 9mo agoWhat would you take out of C# etc?
- littlecranky67 9mo ago(not OP) I would take out mostly historic stuff, that is in there for backwards compat, that has been superseeded. But this could be achieved using linters.
- wvenable 9mo agoAll non-generic container classes and nullable reference types.
- hirvi74 9mo ago> nullable reference types. What would you suggest instead? I quite like the nullable reference types, but I do know many get annoyed. My brain is often a scurry of squirrels, so I grew to become thankful for the nullable refs overtime.
- jborean93 9mo agoI don't mind NRT but I hate dealing with C# projects that haven't set < Nullable>Enable</Nullable> in their csproj. It's not perfect because I know at runtime it can still be nullable but it's nice when the compiler does most of the checks for you.
- wvenable 9mo agoThe compiler now mostly solves this now but the abstraction is a little leaky. I heavily use nullable types but I always want them to be declared nullable.
- aloha2436 9mo ago> Rust without the crazy town complexity. To be clear, the language has a GC then?
- jayd16 9mo agoI suppose it could have some kind of ARC. In theory some future languages could even have some hybrid approach? A high perf default but you can fallback to a GC allocation for hard things?
- AndrewDucker 9mo agoI'm pretty sure that there are multiple GC crates for Rust out there. But using them mixed in with non-GC variables presumably makes things more complex.
- gucci-on-fleek 9mo agoWhat about Lua? The language is very minimal, memory safe, and has Pascal-like syntax just like Delphi.
- ptx 9mo agoLua's variables being global by default seems somewhat error-prone.
- gucci-on-fleek 9mo agoAgreed, but the recently-released v5.5 fixes that [0], and it's fairly easy to fix this in older versions with the following snippet setmetatable(_G, { __newindex = false, __index = false }) [0]: https://www.lua.org/manual/5.5/manual.html#2.2 https://www.lua.org/manual/5.5/manual.html#2.2
- andrewstuart 9mo agoverything is an off by one error in Lua.
- gucci-on-fleek 9mo agoOr conversely, everything is an off-by-one error in every other language :)
- ahartmetz 9mo ago*everythin
- blackoil 9mo agoI 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.
- pjmlp 9mo agoOutSystems, but it isn't cheap.
- rr808 9mo agoRight? I was hoping webassembly would bring back some proper gui tools like this to avoid the whole JS/DOM but no luck so far.
- hirvi74 9mo agoBlazor is pretty cool if you are into that kind of stuff. Mind you, you still might need the slightest tiny dash of JS, but depending on your needs, you might be able to get away from JS entirely.
- rr808 9mo agoSomewhere its in my list of things to try one day. Maybe an ai agent can help make this happen.
- NetMageSCW 9mo agoASP.Net Web Forms still exists, though it is deprecated.
- qingcharles 9mo agoEh. I admit I just use AI now when I want to quickly build a web app like that. I built a huge content management system in a couple of hours that way. If you're talking Windows desktop apps like Delphi used to do, then Visual Studio WinForms is still just like that in 2026 and still getting updates.
- tester756 9mo agoC# is way to go then
- tonyedgecombe 9mo ago>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.
- kryptiskt 9mo agoC# doesn't depend on a VM these days when it is AOT compiled. Same for Java, though C# is rather more user friendly in how it goes about it.
- deleted 9mo ago[deleted]
- trympet 9mo ago> C# doesn't depend on a VM these days when it is AOT compiled Maybe I’m being pedantic, but this is an oxymoron. Also the premise is incorrect. It’s not like the VM is gone. Merely baked into the code at compile time. It compiles IL to native code. Same for IL2CPP. The VM is still there. The term “virtual machine” is confusing. I think you meant to say JIT compiler :-)
- WorldMaker 8mo agoThe trouble with that level of pedantry is that you then can point to LLVM as a VM and say that Clang and other C/C++/Rust tools that AOT through LLVM are "too tied to a virtual machine". Then you can go back through the history of cross-platform optimizing C/C++ compilers and find VMs in the design in almost all of those, too. LLVM is not hiding it in its very clear name, but low-level VMs were a thing for decades before someone named LLVM. VMs have a long history in cross-compilation, even for "low-level" languages like C/C++. The AOT versus JIT distinction is blurry, and the "VM language" versus "non-VM language" boundary is blurrier still, especially when you take into account "standard runtimes" such as glibc and vcrt and whether or not those are statically linked. Is a C program with a compiled with Clang through the LLVM dynamically linking a glibc and statically linking a Boehm GC library "running in a VM"? There's no wrong answer, it's a lot shades of gray. I believe almost every pedantic way to answer that has an equally pedantic counter-argument.
- Sharlin 9mo agoThe minimal memory-safe language is Go. Turns out it's too minimal for most.
- andrewstuart 9mo agoIt’s not memory safe.
- Findecanor 9mo agoPlease elaborate. I've heard that you could break Go's memory safety through a race condition, but that's as far as my knowledge goes.
- bonesss 9mo agoOn 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 linguistic high points of VB, Delphi, and C# with a broad spectrum of OOP(-lite) approaches, and have led those languages by decades on functional constructs that result in meaningfully tighter code. With the benefit of hindsight some approaches clearly map better to cloud computing and system verification. F# also sits parallel to lots of living C#, objectively we see ‘less is more’. Less code per line, fewer lines per solution, terser and more LLM-efficient language. Error rates and refactoring costs are also meaningfully better IME, but harder to quantify in general terms.
- christophilus 9mo agoIt’s a great language. I just wish its compilation speed matched that of OCaml.
- pmkary 9mo agoYeah exactly.
- pjmlp 9mo agoHardly, even Turbo Pascal 7 for MS-DOS is more advanced than Go's type system.
- HumblyTossed 9mo agoYou 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.
- hirvi74 9mo agoIt's true. You will incur the wrath of C#'ers if your simple ToDo list app doesn't have a ToDoListItemRepositoryServiceFactory.cs and a minimum of 4 separate layers in which one must update 20 files because you added a property to one class. Don't get me wrong, I still love C#/.NET. I use it everyday, but my god, has Swift been a breath of fresh air. The Swift community, when not whining about Swift UI, has been much less dogmatic in my experience.
- socalgal2 9mo agoI 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 I use any field, example const avg = data.reduce((acc, { age }) => acc + age, 0) / data.length; It knows that `age` is a number. If I go change data and add an age that is not a number it will complain immediately. I didn't have to first define a type for data, it inferred it in a helpful way. Further, if I add `as const` at the end of data, then it will know 'state' can only be one of `CA`, `MA`, `NY` and complain if I try to check it against any other value. Maybe in this case 'state' was a bad choice of example but there are plenty of cases where this has been super useful both for type safety and for code completion. There's insane levels of depth you can build with this. Another simple example const kColors = { red: '#FF0000', green: '#00FF00', blue: '#0000FF', } as const; function keysOf<T extends string>(obj: { [k in T]?: unknown }): readonly T[] { return Object.keys(obj) as unknown[] as T[]; } type Color = keyof typeof kColors; const kAllColors = keysOf(kColors); Above, Color is effectively an enum of only 'red', 'green', 'blue'. I can use it in any function and it will complain if I don't pass something provably 'red', 'green', or 'blue'. kAllColors is something I can iterate over all colors. And I can safely index `kColors` only by a Color In most other languages I've used I'd have to first declare a separate enum for the type, then associate each of the "keys" with a value. Then separately make an array of enum values by hand for iteration, easy to get out of sync with the enum declaration.
- sfn42 9mo agoLots of languages can infer types. And your last example with the colors is just a dictionary.
- grumpyprole 9mo agoMost languages have poor support for structural types though. If you try and join two records together (like a SQL join), what will your favourite language infer then?
- rixtox 9mo agoIf you feel that TypeScript, or hell even JavaScript, is becoming more alike C#, it's actually deliberately done by Microsoft in benefiting their ecosystem. In this interview they mentioned they had internal demands to convert/transpile C# into JavaScript or TypeScript. So by making these target languages more like C#, it directly benefits their need. But I don't think this should be the driving force in designing ECMAScript. When they are pushing a language feature, they have an unspoken internal goal, and every choice they make is to make JS/TS look more like C#, and they are more likely to dismiss proposals that preventing them from deliverying that goal. There's likely a bit of conflict of interest there.
- tester756 9mo agoIt sounds like conspiracy theory that they design TS/JS to convert from C# easier, huh. The truth is that C# is probably the best designed mainstream language out there. C# was known as a language with lowest amount of WTF per LoC
- froh 9mo agothat's the "evil MS" perspective The sequence of turbo pascal / delphi / c# / typescript which brought us LSP as a sidekick (!) IMHO has benefitted the whole industry at least as much as "transpile c# to ecma script via typescript" . no. much much much more. I do not see a problem with MS also having an internal use case . you know I wouldn't stop using python "because" Guido now works at MS ...
- oaiey 9mo agoSpot on.
- ptx 9mo agoPython has an elected steering council and core team. The governance process explicitly tries to avoid conflict of interest by disallowing more than two steering council members working for the same employer. See PEP 13 [1]. By contrast, .NET is controlled by Microsoft (with veto over board decisions [2] and code changes [3]), integrates Microsoft's telemetry to send your data to Microsoft by default [4] and deliberately hobbles features to benefit Microsoft [5]. [1] https://peps.python.org/pep-0013/ https://peps.python.org/pep-0013/ [2] https://dotnetfoundation.org/about/policies/.net-foundation-bylaws https://dotnetfoundation.org/about/policies/.net-foundation-... [3] https://github.com/dotnet/runtime/blob/main/CONTRIBUTING.md https://github.com/dotnet/runtime/blob/main/CONTRIBUTING.md [4] https://github.com/dotnet/sdk/issues/6145 https://github.com/dotnet/sdk/issues/6145 [5] https://github.com/dotnet/sdk/issues/22247 https://github.com/dotnet/sdk/issues/22247
- pdevr 9mo agoI watched this last week. The part about veering constantly to navigate the maze of internal politics is fascinating. The compromises he had to make, like not being able to put in on Github initially. The easy victories, like making TypeScript open source. The long road to success. The obligatory advice for people writing new programming languages (Hint: Mostly, don't.). His opinion about creating a new language for AI (I agree with his insight, but still think it is possible). Overall, well worth watching.
- m132 9mo agoSurprising 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 Microsoft and Google were part of TC-39 at the time, and were the main opponents of ES4. While they had some rightful reasons to take this position, there's no way ES4 hasn't shaped TS in the end. Perhaps the lack of mention of any of this is due to that TypeScript might have been handed to Anders' team after the project vision and original design have developed (in the video, it is introduced as a continuation of "SharpScript"), but the interview still left me rather insatiated.
- epolanski 9mo agoOut of the big 4 involved in typescript, only one was involved with the tc39
- deleted 9mo ago[deleted]
- pier25 9mo ago> ES4/AS3 even had a nearly identical syntax. Yeah. As someone who lived that era it was so frustrating that they abandoned ES4. I used AS3 daily for almost a decade until Adobe abandoned ActionScript4 and Flash Next around 2015.
- afavour 9mo agoI worked on a web app that used AS3 and Adobe Flex for UI. It’s crazy to think about how powerful that framework was and it was twenty years ago now. No, it was never right for public facing web sites but it shined making internal admins. HTML5 still hasn’t matched it. EDIT: turns out Flex still lives on as Apache Royale: https://royale.apache.org/ https://royale.apache.org/ wish I had an excuse to take it for a spin.
- theusus 9mo agoWasn’t he fired by MS?
- algorithmsRcool 9mo agoNo. He is a Microsoft Technical Fellow and still a core contributor to the TypeScript compiler.
- CharlieDigital 9mo agoI 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/ https://nestjs.com/ [1] https://typescript-is-like-csharp.chrlschn.dev/ https://typescript-is-like-csharp.chrlschn.dev/ [2] https://itnext.io/getting-functional-with-c-6c74bf279616 https://itnext.io/getting-functional-with-c-6c74bf279616
- rafaelmn 9mo agoI 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.
- lateforwork 9mo agoThe 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-exception-handling-falls-short-f7f932488aba https://mckoder.medium.com/the-achilles-heel-of-c-why-its-ex...
- jolux 9mo agoChecked exceptions are bad because people just catch them and rethrow RuntimeException. Proper errors as data would be much preferable.
- lateforwork 9mo ago> people just catch them and rethrow People don't have to. There is a lot of misinformation out there about checked exceptions, and people are responding to the misinformation.
- vips7L 9mo agoChecked 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.
- bigstrat2003 9mo agoYou can misuse the errors as data paradigm just like you can misuse checked exceptions. That doesn't make either paradigm bad, it makes the programmers who misuse them bad.
- HumblyTossed 9mo agoMS 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.
- nozzlegear 9mo agoI used to dream about a TypeScript that targeted dotnet. These days I'm not so sure I'd use it, only because I have a tendency to get caught in the weeds "big braining" the type system to make the perfect type for every situation. F# is my happy medium for the backend.
- gavmor 9mo agoWhat's missing from C#?
- hirvi74 9mo agoDiscriminated Unions is one thing I would like.
- nozzlegear 9mo agoIf we're talking about C# versus F#, then as the other person said, discriminated unions is the main reason I prefer F#. Pipes are excellent too, but I also just like the syntax more. For C# versus TypeScript, it's primarily the type system. You've got DUs like F#, but you also have structural typing, dependent types, linear types, refinement types, string types, and so on. It's F#'s type system on steroids IMO. That said, C# is a great language and I use it all the time. I have a modestly popular open-source package that I write primarily in C#; I do that to make sure it's ergonomic for a C# developer first and foremost (since it's the more popular dotnet language by far) before adding in considerations for VB or F# developers like myself.
- kristianp 9mo agoRestraint.
- aristofun 9mo agoTypescript is the best thing that happened to web development since web development. I just hope they will not overengineer and ruin it moving forward
- zeroq 9mo agoIt is absolutely infuriating that Flash, ActionScript and ES4 draft were completely erased from history. I was there since '00. It all started with Macromedia and their animation tool. They had an idea to add simple scripting so you add commands like "stop" or "gotoAndPlay(n)" on your animation timeline. For whatever reason they chose to use EcmaScript (aka JS). Soon after it turned out that people were doing actual programming and shortly after in 2003 they came up with updated version called ActionScript 2.0 that added all OOP features from Java. This became the EcmaScript 4 draft. If you ever wondered why JS has reserved keywords like "abstract", "protected" or "interface" this is why. What's funny is that by that time the underlying engine was still working on the old ES3 so when you compiled your app your code was transpiled in exact same way TS is transpiled into JS today. We had MXML, which was XML for laying out your controllers and classes like we do today with React and web components. We had Alchemy that allowed you to compile C directly into Flash bytecode - exactly what emscripten is doing. And there was even a way to write assembler directly if you were brave enough. Around 2008 there was even a thing called RedTamarin which was... command line runtime for ActionScript, just like NodeJS. And then Apple came, Flash was gone, and with it all these things. All of these things were erased from memory, and for the next 10 years community was slowly reinventing the wheel.
- deterministic 8mo agoIt's interesting that some of the most successful programming languages (Turbo Pascal, C++, Delphi, Typescript) were designed by people born in Denmark.