News for hackers. Stuff that matters.
Re:Nuitka: a Python compiler written in Python by adsharma on Thursday June 17, 2021 @10:57AM (#27540257)
Why do you think python3 is not typesafe?
Re:Nuitka: a Python compiler written in Python by packetlost on Thursday June 17, 2021 @11:08AM (#27540391)
Because it's not? It has a type system but it's still duck-typed at the end of the day, and no amount of Mypy will change that.
Re:Nuitka: a Python compiler written in Python by adsharma on Thursday June 17, 2021 @11:30AM (#27540673)
It should still be possible to use the python syntax and a reimplemented stdlib to build a statically typed, typesafe variant.

I think you object to the name python3, because there is a duck typed interpreter that's popular.

Re:Nuitka: a Python compiler written in Python by packetlost on Thursday June 17, 2021 @11:38AM (#27540789)
You fundamentally cannot build a statically typed variant of Python without cutting portions of the stdlib, most notably `mock.patch`. You could do a good majority of it, probably enough to be completely usable, but at what point does it stop being Python? Go use Nim if you want statically typed Python-ish syntax.
Re:Nuitka: a Python compiler written in Python by adsharma on Thursday June 17, 2021 @01:33PM (#27542169)
py2many transpiles py3 to nim. Think of python as a way to interpret nim code if you like, with a large installed base of existing libraries.

There is demand for iterative creation of software: first get the logic out with the least friction and then think about types, resource leaks, good software engineering practices etc.

Re:Nuitka: a Python compiler written in Python by goodpoint on Friday June 18, 2021 @08:58AM (#27549808)
Re:Nuitka: a Python compiler written in Python by adsharma on Saturday June 19, 2021 @07:02PM (#27565327)
https://github.com/adsharma/py2many

  pip3 install py2many
  py2many --nim=1 foo.py
Re:Nuitka: a Python compiler written in Python by hermitdev on Friday June 18, 2021 @01:32PM (#27552752)
Type safety and static typing are orthogonal. Both C and C++ are statically typed, yet are not type safe, for instance.