Hacker News new | ask | show | jobs
by nick_meister 2279 days ago
Isn't Python just a language? AFAIK there are many Python interpreters (or implementations), like CPython, Jython, IronPython,....

Couldn't a Python interpreter enforce type checking and raise errors whenever a type doesn't match? I'd be happy to use such an interpreter in many scenarios.

3 comments

Tons of libs wouldn't work this way I guess, probably including stuff in the standard library. So you could really just use a subset of the Python ecosystem. I'm not sure it's worth the effort.
The standard library tends to work pretty well in general, but common libraries like boto will have problems.
Sure, you could also replace the indentation with open and close brackets, replace some keywords and change the standard lib to be like Java.

Or you could use Java which it seems is what you wanted to use in the first place and leave Python alone.

Yes, a language defined by a spec and PEP. And they define the way typing is done.

If you do it differently, you are not implementing python.

Thanks for your reply :)