Skip to content

[New Lecture] Python Static Typing #343

@mmcky

Description

@mmcky

It would be good to add a new lecture on python type hints syntax.

It has a number of good applications including:

  1. improving efficiency of JIT compilers
  2. useful in software design projects to better record interface types for methods and functions
  3. LLM's are now returning code with type hints, so teaching it will reduce confusion for new programmers
  4. help to catch errors (in some IDE's) and using software like pyrefly

Some notes when preparing the lecture

numba: to date Numba doesn't make use of them -- instead you still need to use the Numba decorator to declare types for JIT compilation.

jax: here is the roadmap for python type hints for the jax project


It could be either a new lecture, or as a new section in https://python-programming.quantecon.org/python_advanced_features.html


Things to check out:

  1. pyrefly
  2. warp kernel
  3. https://www.reddit.com/r/nvidia/comments/1jrfjkl/nvidia_adds_native_python_support_to_cuda/

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions