https://github.com/appcypher/raccoon
Python-like syntax for Rust-like performance
https://github.com/appcypher/raccoon
Last synced: about 1 year ago
JSON representation
Python-like syntax for Rust-like performance
- Host: GitHub
- URL: https://github.com/appcypher/raccoon
- Owner: appcypher
- License: apache-2.0
- Created: 2022-01-25T11:59:45.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-03-17T09:29:46.000Z (over 3 years ago)
- Last Synced: 2025-05-07T15:06:56.955Z (about 1 year ago)
- Language: Rust
- Homepage:
- Size: 156 KB
- Stars: 14
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Raccoon
`raccoon` is a language with Python 3.x syntax that is amenable to static analysis. The repository both defines the spec of the language and contains a reference implementation of the compiler.
**Raccoon will not maintain full syntactic and semantic compatibility with Python**. Several dynamic elements known of Python are not available in Raccoon. While Raccoon prioritizes a design that benefits static analysis, it still allows Python's level of flexibility where statically determinable.
Raccoon compiler implementation generates WebAssembly code.
Below is an example of what Raccoon currently looks like:
```py
class Person:
"""
Class for creating details about a person.
"""
population = 0
def init(self, name, age):
"""
Creates a new person
"""
self.name = name
self.age = age
Person.population += 1
def del(self):
"""
Decrement population
"""
Person.population -= 1
def debug(self, f):
"""
Create a string representation of object
"""
return f.debug_class("Person")
.field("name", self.name)
.field("age", self.age)
jane = Person("Jane Doe", 23)
print("jane =", jane)
```