4 ms·
I don’t think we need static typing as a requirement. For folks who want to opt in, it’s probably fine. The divide could be catastrophic and for me, would be a
by yurishimo 5y ago
I don’t think we need static typing as a requirement. For folks who want to opt in, it’s probably fine.
The divide could be catastrophic and for me, would be a major turn off. Look at JS and TS. Some projects go all in, but then others half ass it with `any` return types all over the place. If the JS ecosystem can come together around TS, it’s probably still a decade out until it becomes the default used everywhere. That gap creates confusion and chaos.
If people want similar languages with more/less features, they can create those communities. Erlang and Elixir are good examples.
- cletus 5y agoI don't think there's an alternative to optional static type checking at this point. Like you say, there's a bunch of untyped code out there. I'd actually hate to see a JS/TS divide in PHP. The typing needs to really be a superset of existing PHP and backwards compatible. Such a typechecker should cover at least the following: 1. Point it to a codebase and spit out a bunch of errors/warnings; and 2. Run it at runtime where type checks are logged or a strict mode where they're fatal.