General statistics
List of Youtube channels
Youtube commenter search
Distinguished comments
About
Traveller
Fireship
comments
Comments by "Traveller" (@traveller23e) on "Big projects are ditching TypeScript… why?" video.
@majahanson311 C# dev here, and I really wish they'd never introduced var (statically inferred type). Often times during a peer review when I see the result of a method assigned to a new variable of type var I end up having to call the dev who wrote it to ask what type that particular instance of var is.
5
TS is useful as a tool that helps statically-typed OOP programmers (like myself) to not completely mess everything up when we're forced to do some front-end programming. If you're used to the flexibility of being able to assign anything to anything though I can definitely see how it can be limiting and annoying.
3
As a C# dev my instinct is to agree, however at some level this take is wrong: -Conceptually, the variable name "result" doesn't have to refer to a specific type. It could be a number in one instant and some function a few milliseconds later. -From a data perspective, types don't always exist. In scripting, everything is a stream of characters (unless you're using Powershell). In C programming, fundamentally everything is sets of bits in multiples of char. Sometimes it makes sense to treat 'a' as just a number, or to treat ints as just sequences of bits etc.
2
@Luke5100 Well, in theory yes, but you try getting two teams adding up to 30 devs working on the same legacy codebase to consistently apply any coding standard, let alone your preferred one. 😅 Jokes aside, I'm somehow already a senior enough member of the team that people listen to me at least with regards to this particular thing. Tbh overall I'm just as happy we don't rigidly adhere to any particular rigid guidelines except for "braces on all if statements", since oftentimes the most readable syntax depends on the specifics of the situation. I also don't agree 100% with the Microsoft guidelines, especially where it comes to basic types like int and string.
1
Can you change that setting in your ide?
1
@coherentpanda7115 Vim does too ;)
1