3 ms·
This seems a bit like saying "JavaScript supports types!" because of typescript.
by cmeacham98 3y ago
This seems a bit like saying "JavaScript supports types!" because of typescript.
- ralphist 3y agoIt's not a separate language, you can just start typing your programs right now.
- nextlevelwizard 3y agoexcept nothing enforces your types at run time, you can have typi hints all you want and everyone else cn ignore them
- aunderscored 3y agoSame exists with laws. And in most languages if I want to avoid the type system and hand you a goldfish instead of an int, I can. It just may take more effort. Other language will blow up too if you hand them strange things. Just like python those languages have ways to verify you're not passing goldfish, You just may need more or less effort to use them
- nextlevelwizard 3y agoThats a lot of words for: yeah, you are right
- aunderscored 3y agoA lot of words for "yes, but all languages have this problem." The amount of effort to break the type system is the only difference.
- nextlevelwizard 3y agoany type safe lnguage will indeed "blow up" while python just continues and you dont get as much as a warning. you are wrong take the L
- ralphist 3y agoEveryone else can ignore every coding guideline your team sets up, that’s why code reviews and managers exist.
- wiseowise 3y agoBoth true. What’s wrong with them?
- posix_monad 3y agoTypes are way more mainstream in the JS ecosystem than they are in the Python ecosystem. If you want a "scripty" language with types, then TypeScript is a reasonable choice.
- nick238 3y agoPython actually has type safety though, as you can't do `'1' + 1` like in JS (not that a linter wouldn't scream at you). If I hear another "I compile <insert language> so I know it will work, but you can't do that in Python" I'll lose it. Having the compiler not complain that the types match is not effing "testing".
- scubbo 3y ago> Having the compiler not complain that the types match is not effing "testing". It absolutely is - it's just testing at a _very_ low level of correctness, and is not sufficient for testing actual high-level functionality.