4 ms·
With Anders Hejlsberg also at Microsoft, maybe they do something like type-safe Python similar to TypeScript? Anyway, congrats to both MS and Anders! This will
by _the_inflator 6y ago
With Anders Hejlsberg also at Microsoft, maybe they do something like type-safe Python similar to TypeScript?
Anyway, congrats to both MS and Anders! This will be very interesting for Python.
- Anka33 6y agoAnd {}
- duckerude 6y ago> something like type-safe Python similar to TypeScript That already exists, and van Rossum worked on it: http://mypy-lang.org/ http://mypy-lang.org/
- ehsankia 6y agoAlso Pyre [0] by Facebook and Pytype [1] by Google. More importantly, the core part (type annotations) allowing these libraries to exist has been added to core python for years now and keeps on evolving, so it is an ongoing effort. EDIT: As mentioned below, also added Pyright [2] by Microsoft [0] https://github.com/facebook/pyre-check https://github.com/facebook/pyre-check [1] https://github.com/google/pytype https://github.com/google/pytype [2] https://github.com/microsoft/pyright https://github.com/microsoft/pyright
- bmitc 6y agoIsn't that just F#?
- estomagordo 6y agoIn the sense that indentation has syntactical meaning, yes. Otherwise, no no no.
- bmitc 6y agoI don't understand. You can take Python code and basically write the equivalent in F#, ignoring many of F#'s additional features. It would look similar (probably even be cleaner) and would be type-safe.
- augusto-moura 6y agoF# is not even close of Python, they are very distinct
- bmitc 6y agoOf course, one is a sanely designed language. :) Joking aside, my question centered around that if one wants a type-safe Python, why wouldn't you just want something similar to F#?
- duckerude 6y agoYou can add typing to an existing codebase, saving you vast amounts of work compared to rewriting in a different language.
- bmitc 6y agoCan that really be done for Python and the vast amount of libraries? I don't get the sense that one could simply slap on a static type system on Python and get libraries typed for free. That is unless we're talking about a gradual typing system for Python, where new Python code could be typed and integrated into untyped codebases, similar to Racket and Typed Racket.