Member project spotlight: Clover by Pan

08 May 2014 — By Marc — In spotlight

Pan

Pan, a member of The Great Code Club, recently created his own programming language: Clover. I found the syntax to be beautifully simple, powerful and flexible.

MyClass = class extends MyBaseClass

  initialize = function(value)
    word = value
  end

end

I asked him a few questions about Clover and his experience with the club.

What is Clover and how is it different from other languages?

Clover is a object-oriented language, and everything is an object, class and function are objects. In most object-oriented language you can’t change member functions at runtime, but in Clover, you can.

What inspired you to create Clover?

I worked in a game company before, and my co-workers have created a language call Squirrel for our game engine.

And I thought that if I can create a game in my own language, it’d be cool! But at that time, I didn’t know how to get started. So I searched online and found a book (yes, the book was “How To Create Your Own Freaking Awesome Programming Language”)

But I was lazy, until I joined The Great Code Club, and saw people create there own transpiler, so I decided to create my language.

What have you learned while creating Clover?

I am not a computer science student, and I never learned about Lexer and Parser. While creating Clover, I learned how to create a Lexer and a Parser!!! I learned how source code is translated into nodes. I learned that creating a language is not that hard. And I learned to “do it, or you’ll never know it”.

What would you say to someone who wants to start a side-project but don’t know where to start or stay motivated?

Join The Great Code Club. You’ll find people and fun projects to get started. You see others create great projects, so you can stay motivated.

Did the Great Code Club help you with your project? How?

The Great Code Club helped me a lot, there have many related projects born in the club.

When I had some parts of my grammar I didn’t know how to implement, I’d go to the club’s forum, find some related project with similar grammar, read their code and learn how to implement my own.

(The “Building a Transpiler” videos and josedonizetti’s sss_ruby helped me a lot!).

Thanks to Pan for answering my questions and for an awesome and inspiring project!