3 ms·
Typescript is so good I'd love to see Python, Ruby, PHP, etc. and every other dynamic language steal at least half of it. Python already tries, I think it was t
by baq 3y ago
Typescript is so good I'd love to see Python, Ruby, PHP, etc. and every other dynamic language steal at least half of it. Python already tries, I think it was typescript's early success which tipped the scales from 'type hints are whatever' to what's there today.
- pawelduda 3y agoSorbet is pretty good in Ruby, there are rough edges but for that you have good escape hatches so you don't have to work full time for the type system
- davidatbu 3y agoIn my experience, in an RoR codebase, the dynamic-ness of rails severely reduces its utility to only enabling better auto-complete (as opposed to also helping out with writing logically correct code). In typescript, when I do a refactor, or I add a feature, I will code for hours, relying solely on the typechecker for feedback, and then I will manually test, and then write unit tests. (It helps that I use discriminated unions with exhaustiveness-checks, and avoid shortcuts like `any`, to the extent possible). Such a workflow is impossible with how limited sorbet is in the RoR context. I'd still choose an RoR codebase with sorbet than without it any day of the week tho.
- dtech 3y agoIn my experience Sorbet is a lot less useful than mypy and frequently unhelpful or useless, and both of those aren't in the same league as Typescript.
- davidatbu 3y agoThat ranking of type systems matches my experience a 100% too.
- stephenr 3y agoPHP already has an opt-in type system that's runtime safe (ie it's not just compiled away like in TS). The major piece of the puzzle missing is generics support, but other type handling is already there.