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...
> "Hejlsberg: First of all, C# is not a Java clone. ... we looked at lots of languages, we looked at Java" - https://web.archive.org/web/20100109195800/http://windowsdev... You can just state the author of the language is lying and you somehow know better. You don't even justify why "they don't want to acknoweldge it" - even with Hejlsberg there acknowledging taking ideas from Java - or explain why C# had those diffe…
The history of C# and TypeScript with Anders Hejlsberg [video]
141–150 of 162 posts
Re: The history of C# and TypeScript with Anders Hejlsberg [video]
#142Earlier quoted context omitted.
You can write very functional C#. Our codebase is a mix with some aspects being functional (`ErrorOr`[0] being a big part of it as well as `OneOf`[1]) and OOP. Our core, common services all return `ErrorOr` to allow fluent call chaining at the top of the stack (controllers). Modern C# features like `switch` expressions[2] (not `switch-case`) and pattern matching mean that it is possible to write very terse, expressiv…
That's a perfect example of making it overcomplicated, just in the FP direction. C# uses exceptions for error handling. It has it's own control flow primitives. C# developers know how to work with it, everything else uses it. Why would I want to pull in a randos GH DSL and types to pretend I'm writing F# when I can just use F# that has first class support for this ?
Learning C# when you know TS is like learning Portuguese when you know Spanish.
Re: The history of C# and TypeScript with Anders Hejlsberg [video]
#143Earlier quoted context omitted.
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 .
C# syntax is fine, but has a rotten[1] culture/conventions. I suppose it makes sense that Microsoft's "Java-killer" became enterprise-y, with the same over-engineered indirections.
1. IMO - I find it very unpleasant and never allowed myself to Internalize the IConventions out of spite. YMMV.
Re: The history of C# and TypeScript with Anders Hejlsberg [video]
#144The 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...
> "Hejlsberg: First of all, C# is not a Java clone. ... we looked at lots of languages, we looked at Java" - https://web.archive.org/web/20100109195800/http://windowsdev... You can just state the author of the language is lying and you somehow know better. You don't even justify why "they don't want to acknoweldge it" - even with Hejlsberg there acknowledging taking ideas from Java - or explain why C# had those diffe…
Re: The history of C# and TypeScript with Anders Hejlsberg [video]
#145The 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...
> "Hejlsberg: First of all, C# is not a Java clone. ... we looked at lots of languages, we looked at Java" - https://web.archive.org/web/20100109195800/http://windowsdev... You can just state the author of the language is lying and you somehow know better. You don't even justify why "they don't want to acknoweldge it" - even with Hejlsberg there acknowledging taking ideas from Java - or explain why C# had those diffe…
Re: The history of C# and TypeScript with Anders Hejlsberg [video]
#146I 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.
Re: The history of C# and TypeScript with Anders Hejlsberg [video]
#147The 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.
Re: The history of C# and TypeScript with Anders Hejlsberg [video]
#148Earlier quoted context omitted.
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.
Blazor 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.
Re: The history of C# and TypeScript with Anders Hejlsberg [video]
#149Earlier quoted context omitted.
> the "default" ORM is far more flexible and powerful I have never used any ORM that is as capable. Entity Framework Core with Linq is what keeps me on .NET.
Because EF's default behavior implements Unit of Work, a LOT of the complex transactional spaghetti ended up disappearing when we switched. This aspect of EF is highly underrated for complex entity graph mutations. EF makes the 90% use case easy and the 10% case possible with very little pain. The interceptors, global conventions, and other extension points are an enabler of complex behaviors that are still transpare…
I have never felt more understood by a fellow HN user. I think I know the exact spaghetti you are talking about, and I agree with you 100%. I wish EF could create (SQL) views, but it's not really any issue considering I can just use raw SQL to accomplish the same thing.
> complex entity graph mutations.
I'm too dumb to know what those words mean together. But I going to assume it's something to do with complex entities. If so, I completely agree as well. I sometimes harness the powers of the Dark Magics where my domain entities and database entities are the same objects (I'm not one of those DDD people either). Thanks to EF, I've been able to create some complex objects that really have cut down on a lot of useless objects I used to litter applications with.
Re: The history of C# and TypeScript with Anders Hejlsberg [video]
#150Earlier quoted context omitted.
> "Hejlsberg: First of all, C# is not a Java clone. ... we looked at lots of languages, we looked at Java" - https://web.archive.org/web/20100109195800/http://windowsdev... You can just state the author of the language is lying and you somehow know better. You don't even justify why "they don't want to acknoweldge it" - even with Hejlsberg there acknowledging taking ideas from Java - or explain why C# had those diffe…
Wrong! J# was Microsoft’s Java.
"J# does not compile Java-language source code to Java bytecode .. does not support Java applet development or the ability to host applets directly in a web browser" - https://en.wikipedia.org/wiki/Visual_J_Sharp