Typhon-Language 0.1.1__py3-none-any.whl → 0.1.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {typhon_language-0.1.1.dist-info → typhon_language-0.1.2.dist-info}/METADATA +46 -6
- {typhon_language-0.1.1.dist-info → typhon_language-0.1.2.dist-info}/RECORD +6 -6
- {typhon_language-0.1.1.dist-info → typhon_language-0.1.2.dist-info}/WHEEL +0 -0
- {typhon_language-0.1.1.dist-info → typhon_language-0.1.2.dist-info}/entry_points.txt +0 -0
- {typhon_language-0.1.1.dist-info → typhon_language-0.1.2.dist-info}/licenses/LICENSE +0 -0
- {typhon_language-0.1.1.dist-info → typhon_language-0.1.2.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: Typhon-Language
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.2
|
|
4
4
|
Summary: Typhon programming language
|
|
5
5
|
Requires-Python: >=3.12
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
@@ -17,14 +17,50 @@ Dynamic: license-file
|
|
|
17
17
|
|
|
18
18
|
Typhon is a modernized syntax sugar for Python, designed to improve developer experience with features like static typing, brace-based scoping, and expressive functional programming capabilities.
|
|
19
19
|
|
|
20
|
-
GitHub repository: [Typhon](https://github.com/hnakamura5/Typhon)
|
|
21
|
-
PyPI package: [Typhon-Language](https://pypi.org/project/Typhon-Language/)
|
|
20
|
+
- GitHub repository: [Typhon](https://github.com/hnakamura5/Typhon)
|
|
21
|
+
- PyPI package: [Typhon-Language](https://pypi.org/project/Typhon-Language/)
|
|
22
|
+
- VSCode extension: [Typhon Language Support](https://marketplace.visualstudio.com/items?itemName=hnakamura5.typhon-language-support) from [GitHub Repository](https://github.com/hnakamura5/typhon-language-support)
|
|
23
|
+
|
|
24
|
+
## Getting Started
|
|
25
|
+
|
|
26
|
+
Install Typhon via pip:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
pip install typhon-language
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Run Typhon from the command line:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
typhon --help
|
|
36
|
+
```
|
|
37
|
+
Create a simple Typhon program in `hello.typh`:
|
|
38
|
+
|
|
39
|
+
```typhon
|
|
40
|
+
def main() {
|
|
41
|
+
print("Hello, Typhon!")
|
|
42
|
+
}
|
|
43
|
+
main()
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Run the program:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
typhon run hello.typh
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Or run directly using uvx:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
uvx --from typhon-language typhon run hello.typh
|
|
56
|
+
```
|
|
57
|
+
|
|
22
58
|
|
|
23
59
|
## Design Concepts
|
|
24
60
|
|
|
25
61
|
Typhon is built on three core pillars:
|
|
26
62
|
|
|
27
|
-
1. **Safety**: As expected
|
|
63
|
+
1. **Safety**: As expected in modern programming languages, Typhon enforces safety through static typing, lexical scopes, immutable-by-default variables (`let`), and null safety features (`?.`, `??`, `?()`, `?[]`).
|
|
28
64
|
2. **Expressiveness**: Expression-oriented design with functional programming features. Control comprehension forms for `if`, `match`, `try`, and so on enable concise, value-returning expressions. Function literals, placeholders and pipe operators facilitate clean and readable code.
|
|
29
65
|
3. **Python Interoperability**: Typhon compiles directly to Python, allowing you to use the vast ecosystem of Python libraries seamlessly while enjoying a modern syntax.
|
|
30
66
|
|
|
@@ -48,8 +84,8 @@ Typhon retains most of Python's semantics but introduces significant syntax chan
|
|
|
48
84
|
|
|
49
85
|
### Main Changes
|
|
50
86
|
|
|
51
|
-
- **Brace Scoping**: Typhon uses `{ ... }` for blocks, replacing indentation-based scoping. Both `;` and line breaks can also act as delimiters. See [Lexical Structure](doc/reference/lexical_structure.md).
|
|
52
|
-
- **Static Typing**: Type checking is enforced at compile time.
|
|
87
|
+
- **Brace Scoping**: Typhon uses `{ ... }` for blocks, replacing indentation-based scoping. Both `;` and line breaks can also act as delimiters. See [Lexical Structure](doc/reference/lexical_structure.md) for more details.
|
|
88
|
+
- **Static Typing**: Type checking is enforced at compile time. Currently powered by [basedpyright](https://docs.basedpyright.com/latest/) type checker.
|
|
53
89
|
- **Declarations**: Variables must be declared with `let` (immutable) or `var` (mutable). See [Variables](doc/reference/variables.md).
|
|
54
90
|
|
|
55
91
|
### Syntax Extensions
|
|
@@ -83,6 +119,10 @@ Some Python features are removed to enforce safety and clarity. See [Removed Fea
|
|
|
83
119
|
|
|
84
120
|
Typhon can be run directly or translated to Python.
|
|
85
121
|
|
|
122
|
+
`.typh` files are Typhon source files. In directory mode, all `.typh` files are processed.
|
|
123
|
+
|
|
124
|
+
Note Typhon uses `.typhon` directory in source paths to place translated Python files and caches.
|
|
125
|
+
|
|
86
126
|
### Run
|
|
87
127
|
|
|
88
128
|
Run a Typhon source file or directory.
|
|
@@ -40,9 +40,9 @@ Typhon/Transform/visitor.py,sha256=PrBI-QFYFILpFLK2EmfoH6wx3Qa9fVVs72Jiw2Qz3cg,1
|
|
|
40
40
|
Typhon/Typing/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
41
41
|
Typhon/Typing/pyright.py,sha256=ScJOZ9uMsIovj_4xcZmPJ2ggDqI3Ju17n6dfkLku7jI,4867
|
|
42
42
|
Typhon/Typing/result_diagnostic.py,sha256=rXHlqoWPl6yQbYamJPRO08Xo4D5CXxUxSfLnix06mAs,3679
|
|
43
|
-
typhon_language-0.1.
|
|
44
|
-
typhon_language-0.1.
|
|
45
|
-
typhon_language-0.1.
|
|
46
|
-
typhon_language-0.1.
|
|
47
|
-
typhon_language-0.1.
|
|
48
|
-
typhon_language-0.1.
|
|
43
|
+
typhon_language-0.1.2.dist-info/licenses/LICENSE,sha256=k1dBJysU0_U_eCiP1Nt6MhoHmhhOaaXgDHeagjORZs0,1074
|
|
44
|
+
typhon_language-0.1.2.dist-info/METADATA,sha256=3BSU3oyc6wVm75et82GdgzGhCT4c-XCC4G6H8AwVLxU,6204
|
|
45
|
+
typhon_language-0.1.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
46
|
+
typhon_language-0.1.2.dist-info/entry_points.txt,sha256=a_tTwpYswStM7ViRyF0j7qn9jV3lN0TpGiYG8TQEjMw,48
|
|
47
|
+
typhon_language-0.1.2.dist-info/top_level.txt,sha256=H83GWRaycF_6jk0COdUlzXliigwTNM00Svnlp_k9F5Y,7
|
|
48
|
+
typhon_language-0.1.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|