I will say that I'm my experience developers with a background in C# seem to love Typescript while developers with a background in Javascript seem to be slower to warm up (a lot slower).
In our office it seems like the JS folks are sensing that they should "get on board" with the clear enthusiasm from the C# folks but there is resistance (mostly muttered quietly to each other to avoid looking like they don't get something that seems so obvious to others).
As a .NET dev I feel 100% the same in regards to JS and TS. I'm proficient with all three but I have seen so so so many C# devs writing javascript/typescript with classes "bEcaUsE iT haS cLasSes tOO".
Part of the appeal of TypeScript is that you could fairly easily migrate a team to it from JavaScript if they're all fairly comfortable and competent with the current JS ecosystem. For most JS devs I've worked with, this wouldn't be true with a language like C# or Kotlin.
I'd argue that buying into a more comprehensive language would probably be worth it if everyone was into it, but in my own experience JS devs really, really like JS and have very little interest in learning something better suited to the problem they're solving. This is true outside of software too. People love familiar tools and methods, even if they aren't the best ones.
There's also the fact that your team's output will be best based on their enjoyment and engagement. Even if the tooling isn't perfect, they'll probably build better software if they're enjoying it. JS and TS are good enough in most cases to get teams where they need to be.
I really feel the same about javascript with typescript. It feels a heck of a lot like new grads or old c#/java devs trying to keep up with the times by switching to javascript, but then resisting the code structure and loose typings.
From what I've seen, there are a lot of vocal proponents of Typescript, but not many vocal detractors. Which of those is the actual majority is hard to day.
I have a theory that many of the people who like Typescript came from a statically-typed background (Java, C#, etc) and don't like the loosely-typed world of Javascript.
More speculation: People who came to front-end development by choice are happier with Javascript than those who were transplanted from the server side and forced to convert to the One Language Of Browsers (ignoring transpilers, of course).
I have also been doing C# and JS for years and completely agree. JS is nice for prototyping because of the light footprint but as soon as your code gets more complex it becomes a problem to manage/maintain, far from impossible, just harder. From this perspective TypeScript is a godsend.
I use Typescript daily and I really enjoy working with it. I've been working with Javascript for quite a while and Typescript made my life a lot easier.
I do however (possibly controversially) find the Javascript world in general rather tiring. There are constantly new (not necessarily more advanced) ways of doing things the most basic things. For me, it's like a ZOO with loads of wild animals, frameworks, Github issues and opinionated evangelists.
Don't get me wrong here - learning new tech is great. Especially if you want to stay sharp until the old age. Nevertheless, sometimes you just want to focus on getting stuff done and not trying out a brand new invention of rendering an input field (which will work and look exactly the same to users). While Typescript is much more than that, a similar sentiment might be making your fellow devs reluctant in trying it out.
Following from the above, I'd imagine that there is some kind of a person (top-down approach: head of engineering, CTO?) that makes decisions about code standards and tech. It might be worth talking it through with them, especially if you have concrete examples how Typescript could improve productivity. That's how we got Typescript into projects at the last place where I worked.
From the perspective of the devs themselves (bottom-up approach), a good motivator might showing the momentum that Typescript has in its adoption. There is a high chance that they'll have to learn it anyway if they plan to move companies at some point which makes it a good tradeoff to start earlier. Get paid for learning kinda argument.
in hindsight, typescript was the ideal way for me to migrate from C# to Javascript. now I can write "pure" javascript without typescript holding my hands, but i do greatly prefer having typescript around!
the only drawbacks of typescript (visual studio) I see right now is lack of debugging support for nodejs, and lack of angularjs intelisence (webstorm supports that well)
Good question. To be fair, JavaScript was my first "real" programming language, so my brain has adapted the most to it's weirdness. That's probably why TypeScript is very useful for me. But to answer your question, I've been using C# primarily for the last 4 years, and I dabble in other languages like Rust and Python. I used C++ in school (that's what they used for programming classes if you'll believe it). TypeScript feels pretty nice, but I do adore C#. I wish Microsoft would make a T# (as someone else put it once).
Type hype is real. It almost seems like job-creation propaganda at this stage.
When I judge things, I look at practical outcomes; and the fact is that I produce better software with more features within the same timeframe if I use JavaScript rather than TypeScript and the product in both cases is equally robust. This has been true for me both independently and as part of a team.
With JS, I can write more code and more tests within the same amount of time and there is no drop in quality.
I'm very surprised that nobody else seems to be experiencing the same thing. I've been back and forth many times between the two paradigms and for me it's clear as day.
I don’t think so, and we build JS for enterprise and we were previously/are somewhat a mainly C# house.
Typescript has some advantages that are appealing to people coming from Java/c#, and it integrates sort of well into a codebase that’s a mix of JS and typescript. So you don’t really lose that much from using it. We found it relatively burdensome compared to plain JS, simply put, it made us less productive. You fix some of JSs problems, mainly typesafety, but the trade off is that you’ll need to keep updated on both typescript and JS as well as getting a more complicated approach to prototypes and testing that isn’t as smooth (at least not for us, and that may be us not typescript but it’s still something you have to account for).
If we were doing angular on the front end we might do typescript, but I honestly think we would’ve picked angularDart and flutter instead of typescript.
I don’t think you go wrong either way though, typescript has just been unnecessary for us.
I agree with this take. I'm primarily JavaScript/TypeScript developer, doing both front end and back end web app development. Microsoft being a good steward of TypeScript (and now the js ecosystem) inclines me to give C# and .NET Core a shot, and probably Azure down the line.
I started out agreeing heavily with the article (yeah, javascript sucks today!), but one thing stuck out to me:
If Typescript makes Javascript so much work because the tooling discourages learning best practices, how does moving to C#, which is designed very similarly, help?
I.e. if half the cardinal sin was creating Typescript in the first place and that's part of why Javascript sucks so bad (I am inclined to agree, FWIW), how does C# then make it better?
Author is light on the details here. I do agree that strong typing systems, safety checks are preferably on backend systems-grade code, at least, but I don't think C#'s types are strong enough, for that prefer something like a Haskell-ish language, Cayenne e.g., Ada, and with strong code-re-usability. I decline to champion a particular language, I only know C# has a lot of baggage from Java/Typescript/Javascript, which it would be better without (C# is also starting to suffer from a C++-ish problem, where there are so many new and different ways to do the same thing that interoperability and "good" standards are swiftly becoming a problem).
If you write JavaScript with a c# frame of mind, of-course you'll find it akward and hard to test. TypeScript is basically JavaScript written in a c# frame of mind, and there is nothing wrong with that. If it helps some people be more productive, then more power to them. but don't fool yourself that TypeScript is the best way to do JavaScript. If you're finding writing maintainable apps in plain JavaScript hard then you are simply doing it wrong. You can learn how to do it right (hint: its a functional, not a class based language) and add one more tool to your box, or you could stick with Typescript and your comfort zone.
I have worked with TypeScript, and I enjoyed it. It reminded me of ActionScript 3, a language I really enjoyed that's more or less dead now. And I also enjoy plain JS, and its just more powerful and expressive.
> I won't hire a web or Node developer who has a problem with it today because understanding the value of gradual and structural typing is, I strongly think, evidence of baseline competence.
If you think the benefits of "gradual and structural typing" cannot be achieved in JavaScript, you clearly don't understand the language. And that's ok. It is also ok hire people you are comfortable with, rather than those who challenge and disrupt your way. And I wouldnt want to work somewhere where the devs are too rigid or tribal about tools. Am more interested in what I'm building, rather than the tools used.
That may be true in theory, but I find that people write radically different code in JS and in TS. TS code looks a lot more like C# compared to regular JS code, people use a lot of classes over plain functions and data structures.
In our office it seems like the JS folks are sensing that they should "get on board" with the clear enthusiasm from the C# folks but there is resistance (mostly muttered quietly to each other to avoid looking like they don't get something that seems so obvious to others).
reply