PyGo is a toy programming language project born out of a journey to learn Go. It aims to explore the possibility of combining Python's readability with Go-inspired features. This project serves as both a learning exercise and a playground for language design ideas.
PyGo was born when a Python developer learning Go had a eureka moment: "If Python is dynamically typed and Go is statically typed, maybe I can create a language that's dramatically typed!"
This flash of caffeine-induced inspiration led to a toy language where variables might act up unexpectedly, functions occasionally go on coffee breaks, and 'Hello, World!' sometimes replies 'Not today, I have a headache.' It's growing alongside its creator's coding skills and coffee intake. Who knows what it might compile next? Who knows? One day it might even learn to fly – because in the world of programming, anything is possible!
PyGo is in its very early, experimental stages. Here's what we have so far:
- Basic syntax parsing for function definitions and print statements
- A VS Code extension for syntax highlighting
- Foundation for a simple interpreter
PygoSyntax - VS Code Extension
Example of current PyGo code:
def main():
print("Hello, PyGo!")
While PyGo is currently a toy project, here are some ideas for its potential development:
-
Short-term Explorations
- Experiment with user input handling
- Try implementing basic variables
- Explore simple loop constructs
- Attempt conditional statements
-
Learning Objectives
- Gain deeper understanding of language parsing
- Explore the basics of type systems
- Learn about error handling in language design
-
Long-term Aspirations
- Potentially evolve into a more feature-complete language
- Possibly explore compiler design concepts
- Consider implementing Go-inspired features as learning progresses
PyGo is primarily a learning project, but you're welcome to experiment with it:
- Clone this repository
- Install the PyGo VS Code extension (instructions in the
vscode-extensiondirectory) - Create a
.pygofile and try writing basic PyGo code
As a personal learning project, PyGo is not actively seeking contributions. However, feedback, suggestions, and discussions about language design are always welcome!
PyGo is open source and available under the MIT License.
PyGo is inspired by the creator's journey of learning Go and appreciation for Python's syntax. It's a testament to the inspiring nature of both these languages in encouraging new programmers to explore language design.
PyGo is a toy project and a work in progress, born out of curiosity and the desire to learn. While its future development is uncertain, it represents the exciting first steps into the world of language design and implementation. Stay tuned for updates as this learning journey continues!
