An Interest In:
Web News this Week
- March 19, 2024
- March 18, 2024
- March 17, 2024
- March 16, 2024
- March 15, 2024
- March 14, 2024
- March 13, 2024
Mufi Concept Toy-Lang
I've been considering implementing my own toy language (which I hope I can expand to a more production) once I finish reading reading Robert Nystorms Crafting Interpreters. This language similar to clox
in the book will be written with a byte-code compiler in either C or Rust. My current idea is to go C, and down the line start porting it to Rust if I'd like, so how does the language look like?
Well it will be an OOP Language, so it will feature things like classes, and follow a C-style syntax. Let's look at a sample program to get a better idea:
class Foo{ var member1; var member2; func new(val1, val2){ member1 = val1; member2 = val2; }}func main(){ var foo = new Foo(5, 4);}
This is a rough idea, but again this is all concept and can easily change. I will probably start off as a dynamic typing, but as a preference I'd like to make the language statically typed, and have separate mutable and immutable bindings like var/const
. This language will have a garbage compiler (a mediocre one), and will start with a builtin standard library.
I already made a little logo for the language, comment your thoughts about this project, and contributors are welcomed to join this interesting, and pain with the fun project.
Original Link: https://dev.to/mustafif/mufi-concept-toy-lang-1j0f
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To