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 comp…


This content originally appeared on DEV Community and was authored by Mustafif

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.

Mufi-Lang Logo


This content originally appeared on DEV Community and was authored by Mustafif


Print Share Comment Cite Upload Translate Updates
APA

Mustafif | Sciencx (2022-03-30T19:29:14+00:00) Mufi Concept Toy-Lang. Retrieved from https://www.scien.cx/2022/03/30/mufi-concept-toy-lang/

MLA
" » Mufi Concept Toy-Lang." Mustafif | Sciencx - Wednesday March 30, 2022, https://www.scien.cx/2022/03/30/mufi-concept-toy-lang/
HARVARD
Mustafif | Sciencx Wednesday March 30, 2022 » Mufi Concept Toy-Lang., viewed ,<https://www.scien.cx/2022/03/30/mufi-concept-toy-lang/>
VANCOUVER
Mustafif | Sciencx - » Mufi Concept Toy-Lang. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/03/30/mufi-concept-toy-lang/
CHICAGO
" » Mufi Concept Toy-Lang." Mustafif | Sciencx - Accessed . https://www.scien.cx/2022/03/30/mufi-concept-toy-lang/
IEEE
" » Mufi Concept Toy-Lang." Mustafif | Sciencx [Online]. Available: https://www.scien.cx/2022/03/30/mufi-concept-toy-lang/. [Accessed: ]
rf:citation
» Mufi Concept Toy-Lang | Mustafif | Sciencx | https://www.scien.cx/2022/03/30/mufi-concept-toy-lang/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.