4 ms·
> I can do almost all the dynamics things that I can do in Python with C#, but in a type safe way. If you like flexibility with a good type system, give Typesc
by tejinderss 3y ago
> I can do almost all the dynamics things that I can do in Python with C#, but in a type safe way.
If you like flexibility with a good type system, give Typescript a try, its miles ahead of mypy and its designed by same person who’s behind C#.
- AlexSW 3y agoI don't think this is a completely accurate comparison, as TypeScript is transpiled to JavaScript and this provides restrictions to the expressibility and usability of types at runtime, which I've sometimes hit my head against. C# has much more type information available at run time, as does Python.
- rtpg 3y agoTypescript is of course nice and is a great type system but can’t totally paper over the absolutely impoverished base language that is JS. When you use Python and things like equality do what almost anyone wants instead of checking object identity, it’s real annoying to futz around in TS
- influxmoment 3y ago[1, 3, 12].sort() == [1, 12, 3] 5 in [5] == false
- ptx 3y agoEven setting the sort order aside, just the fact that it both returns the sorted array and also sorts it in-place is not great. I prefer Python's distinction between sorted (returning a sorted copy) and list.sort (sorting in place and returning nothing).
- grumpyprole 3y agoEven better would be to try F#, it will be able to use all the .NET libraries, has Python's succinctness, but with a strong type system (and inference).
- hakanderyal 3y agoI may switch to it eventually, but at this point in my career 16 years in, I try to avoid seemingly niche things when I just want to get stuff done. "Boring" is good. I know it's the same platform under the hood but I decided to spend my "innovation tokens"[0] on the stuff I'm buildin. [0]: https://mcfunley.com/choose-boring-technology https://mcfunley.com/choose-boring-technology
- grumpyprole 3y agoI call it "novelty budget" and I completely agree.
- hakanderyal 3y agoI'm a full stack dev so I'm also using TS at the same time. While the flexibility is nice, it's too flexible for my taste. To give a one basic example, I want to go to the definition of a symbol with a single action. Not possible with the current TS tooling and all the crazy things you can do with it's type system. I want the type system to be predictable, so it can support whatever I want to build on top of. There are features I'm missing with C#, but still I'll choose it over TS any day.