[Python-Dev] Re: Typing syntax and ecosystem, take 2

2021-04-14 Thread Hugh Fisher
iled to .pyc for execution by the Python interpreter most of what I'm complaining about would go away. -- cheers, Hugh Fisher ___ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@pyth

[Python-Dev] Re: Typing syntax and ecosystem

2021-04-14 Thread Hugh Fisher
ays, so this is probably a good place to stop on. Thank you everybody for responding. -- cheers, Hugh Fisher ___ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.py

[Python-Dev] Re: Typing syntax and ecosystem, take 2

2021-04-14 Thread Hugh Fisher
performance hit from just being present is so great that talented programmers are working hard to make the Python interpreter ... ignore them more efficiently. -- cheers, Hugh Fisher ___ Python-Dev mailing list -- python-dev@pyth

[Python-Dev] Re: Typing syntax and ecosystem

2021-04-13 Thread Hugh Fisher
; etc without declaring any kind of type for x. -- cheers, Hugh Fisher ___ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.or

[Python-Dev] Re: Typing syntax and ecosystem, take 2

2021-04-13 Thread Hugh Fisher
run because TypeScript is not valid JavaScript. Same was true for the old CFront C++ -> C translator. Errors are automatically detected. If you forget to run mypy, you've got a program which *looks* correct but might not be. -- cheers, Hugh Fisher __

[Python-Dev] Re: Typing syntax and ecosystem, take 2

2021-04-13 Thread Hugh Fisher
it will turn out to be a prince(ss) when you kiss it." Yes, perfect is the enemy of good enough. I'm reading (OK, skimming) the emails about implementing PEP 649 on this list and I'm seeing significant problems in the current tools, not just cosmetic. -- cheers, Hu

[Python-Dev] Re: Typing syntax and ecosystem, take 2

2021-04-13 Thread Hugh Fisher
namic Python, those problems go away because the type notation would not be valid Python code. In the integrated approach, type checking built in, there would still be overhead but it would be *useful* overhead doing the actual type checking. -- cheers, Hugh Fisher __

[Python-Dev] Re: Typing syntax and ecosystem, take 2

2021-04-13 Thread Hugh Fisher
dvantage is that the Python interpreter does not need to know about typing, so no PEP 543 and no PEP 649, which is currently generating a lot of esoteric (to me) discussion on python-dev. > Please do not take these comments personally, in a verbal setting I would try

[Python-Dev] Typing syntax and ecosystem, take 2

2021-04-12 Thread Hugh Fisher
integrated into CPython itself. An alternative is the TypeScript/JavaScript model, where typed Python becomes a distinct programming language that cannot be executed directly by the Python interpreter. -- cheers, Hugh Fisher ___ Py

[Python-Dev] Re: Typing syntax and ecosystem

2021-04-12 Thread Hugh Fisher
scussion forward about separate syntax or type checking integration, I apologize to anyone who feels personally insulted by my response. That was not my intention. -- cheers, Hugh Fisher ___ Python-Dev mailing list -- python-dev@pyth

[Python-Dev] Re: Typing syntax and ecosystem

2021-04-12 Thread Hugh Fisher
away before running an interpreter which reads the same source, scans into lexical tokens, builds an abstract syntax tree, and executes. On the purely pragmatic level there is an extra chance for mismatches and things to go wrong; and from an environmental viewpoint it isn't a great use of resources.

[Python-Dev] Re: Python-Dev Digest, Vol 204, Issue 59

2020-07-08 Thread Hugh Fisher
jects! So now "const" in C++ for objects just means you don't intend to change the internal state, but it might do so anyway. Again, I can see a case in embedded systems for "const" meaning "this can be put in ROM". But I don't think that use case is co

Re: [Python-Dev] Need discussion for a PR about memory and > objects

2018-11-18 Thread Hugh Fisher
r the language reference, use the license plate or registration analogy to introduce "handle" and after that use handle throughout. It's short, distinctive, and either will match up with what the programmer already knows or won't clash if or when they encounter handles els

Re: [Python-Dev] Heap allocate type structs in native extension modules?

2017-12-29 Thread Hugh Fisher
But be aware of caveats (https://bugs.python.org/issue26979). Thanks! I'll give it a go. I've already run into and solved the tp_new issue, so that won't be a problem. -- cheers, Hugh Fisher ___ Python-Dev m

[Python-Dev] Heap allocate type structs in native extension modules?

2017-12-26 Thread Hugh Fisher
their own attributes, and this is turning out to be painful with static PyTypeObject structs Would it be better to use dynamically allocated type structs in native modules? -- cheers, Hugh Fisher ___ Python-Dev mailing list Python-

Re: [Python-Dev] C99

2016-08-06 Thread Hugh Fisher
d MSVC have different ideas about how inline functions in C work. Are they static or extern? Do you need provide an implementation body somewhere? There are also differences between the C++ and C99 definitions. Probably all solvable with build settings, but not as easy as one li

Re: [Python-Dev] fullOfEels, assistant program for writing Python extension modules in C

2016-02-11 Thread Hugh Fisher
s, but could also be handy for teaching when it's easier to just give students plain Python modules to look at. Thanks for replying. -- cheers, Hugh Fisher ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.or

[Python-Dev] fullOfEels, assistant program for writing Python extension modules in C

2016-02-11 Thread Hugh Fisher
C code required: module initialization, class type structs, C method functions and method tables. Downloadable from https://bitbucket.org/hugh_fisher/fullofeels All feedback and suggestions welcome. -- cheers, Hugh Fisher ___ Python-D