https://github.com/TheRealMichaelWang/NoHoPython
A strongly-typed, compiled dialect of Python.
https://github.com/TheRealMichaelWang/NoHoPython
Last synced: 5 days ago
JSON representation
A strongly-typed, compiled dialect of Python.
- Host: GitHub
- URL: https://github.com/TheRealMichaelWang/NoHoPython
- Owner: TheRealMichaelWang
- License: mit
- Created: 2022-08-25T01:32:48.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-01-28T23:31:00.000Z (almost 2 years ago)
- Last Synced: 2025-10-04T02:56:20.568Z (2 months ago)
- Language: C#
- Size: 1.77 MB
- Stars: 13
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-programming-languages - North-Hollywood Python - A strongly-typed, memory-safe, compiled dialect of Python, that transpiles to human-readable C. (Uncategorized / Uncategorized)
README
# The North-Hollywood Python Compiler
A strongly-typed, memory-safe, compiled dialect of Python, that transpiles to human-readable C.
- Guarentees memory saftey by enforcing RAII, and executing limited reference counting for closure-captured classes
- Unlike rust, NoHoPython reference counting - which is only used for capturing classes for closures - guarentees no memory leaks.
- Guarentees type saftey via a strong yet flexible static type-checker
- No null. Enums/Variants are used instead.
- Enum/Variant match statements must be exhaustive.
- Supports first-class, anonymous functions
- Functions can be passed around as values
- Supports closures, which are functions that can capture variables outside of it's lexical scope
- No globals. Functions only can mutate arguments, and captured classes in addition to it's locally defined varaibles.
- Code organized via a powerful module system
- No C++-esque `using namespace`'s(prevents pollution of the global namespace)
- Runtime Saftey
- Array access' are all bounds checked.
- No Undefined Behavior, despite targeting C
- Sequence of evaluation is guarenteed
- Easy C interop
- Effortless FFI interop with C, via the `cdef` keyword.
- Include C headers with the `cinclude` keyword
- Information-Rich Error-Reporting
- Clean, precise error messages during compile time
- Runtime errors, such as assertion faliures or index-out-of-bounds errors, are reported with their locations in the source code.
- Reports informative, pythonic stack traces (not only for user-defined, NHP functions but also for calls to foreign C functions)
- Built-in memory debugging that can report memory leaks