Re: Typing syntax and ecosystem, take 2

April 14, 2021
4:58 p.m.
Yes, and I see that as a problem. Here are two versions of code V1 # Apocalypse may occur if foo is not <complicated-type> foo = "coconut" V2 # Apocalypse may occur if foo is not <complicated-type> foo : <complicated-type> = "coconut" To the Python interpreter both have the same semantics and runtime behaviour. But V2 has type annotations, which are effectively syntactically constrained comments within individual statements. As code they do absolutely nothing. However, the 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
1433
Age (days ago)
1433
Last active (days ago)
0 comments
1 participants
participants (1)
-
Hugh Fisher