5 ms·
Interesting to compare with TypeScript, which runs into similar issues. Before TypeScript 1.1, the intelligence was quite slow, but is now fine even for large
by DougBTX 11y ago
Interesting to compare with TypeScript, which runs into similar issues.
Before TypeScript 1.1, the intelligence was quite slow, but is now fine even for large projects. Third party libraries often have type definitions in the DefinityTyped collection.
That just leaves constructs that work in JavaScript, but which can't be type checked in TypeScript. This is often double-edged. TypeScript's types are not amazingly flexible, so it encourages writing less magical code, improving readability, but it also discourages some patterns that are quite useful, such as passing references to properties using string key names, which are hard to type-check.
- aikah 11y ago> TypeScript's types are not amazingly flexible, so it encourages writing less magical code (...) you can "cast" anywhere so it's not really an issue : (<(string)=>string>baz['baz'])('foo') Otherwise typescript support union types and such ... Even without .d.ts headers everywhere it is still useful. I prefer it to babel and co as it is easier to track ES6/7 integration. Never used typed clojure though ,but I don't know any example of a language that didn't have types before and retrofitted type safety without any issue and breaking backward compatibility.