DEV Community


Discussion on: React: thoughts from an Angular developer

wkrueger profile image
Willian Krueger • Edited

Ive usually noticed 2 kinds of people who run from TS:

  • Programmer who got traumas from old Java days. They fear the types will hinder the development too much and usually fail to grasp that TS is nothing like java/C# because its is a lot more flexible.

  • Programmers who started at JS/python and never effectively got to work with static typing

dawlz profile image

I am the second kind but after working with TS on a react project, I found it kinda interesting.

mikejunt profile image
Mike Juntunen • Edited

I understand it seems like extra work starting out, but man the amount of time and energy you save is really unparalleled and it's no great question why modern languages pretty much always incorporate these features

I've actually wondered why no one has ever attempted a TS/C# equivalent for Python. I know it's used for some different applications than C/JS but you'd think the benefits exist

For me, understanding how TS was created and structured to let C# developers apply familiar programming principles to JS enabled me to follow that path backwards and use my understanding of what TS did to understand how C# was intended to operate.

Working in React, or raw JS in general feels like a concession to today: a necessity because it's what we're already using, because its faster for a simple implementation, and so on. Working with TS and Angular makes me feel like I am also developing skills that are transferrable to other languages and applications. I am a junior full stack dev, so that kind of transferability is important to me.

I think a lot of TS-skeptics probably don't know or haven't really stopped to absorb the fact that TS is set up to allow any valid JS code to work: if there's something you want to write w/o using TS's features, it's guaranteed to work. So it really doesn't have a downside: You can take what benefits you want, even if that's just defining object interfaces so that your IDE knows what your object keys are, and still write any code you don't want to use those features with without modification.

Thread Thread
wkrueger profile image
Willian Krueger • Edited

there IS a "TS for python", but its still growing. It didnt have the explosive growth of TS.

The guys at dropbox (which had Guido Van Rossum) pionereed mypy. From the mypy experience they incorporated PEPs on what python type checkers should agree.

mypy has a bit of a lackluster editor experience, so MS is pushing their own python type checker, PyRight, which is more IDE-friendly. Yeah, and they hired Guido. I frown that pyright is written in javascript (not even typescript... probably for easier VSCode integration).

Havent used pycharm lately but they probably also implement their own type-checking instead of relying on mypy.

Forem Open with the Forem app