Home > English, Jeez, Programming > A New Project

A New Project

I’ve been thinking of a small project to do, and trying to think of something new, I completely forgot about an old project that I always wanted to do, but never had enough time.

It’s a new programming language.
Yes, I know there’s plenty of them around, but these are things I like to do: creating new tools to make people’s life easier _and_ dealing with languages. Also, as the ‘best programming language ever’ subject is such a reason for discussions and, in my opinion, a matter of taste, I decided to make the language that suits my taste.

I’m working on its grammar. It’s not very complex by now, but should get more complex as the development goes further. I can say that I’m trying to mix things of languages I like. The syntax will probably be very Python-like. I’m also trying to get some things from Java. That’s why I’ve been calling the language JBoia, but it will probably have a little of C++ flavour.

I decided to write the posts about it in English because:
1) I need to practice my English (so, sorry for any mistakes);
2) I expect to receive commentaries and suggestions about the language design from people interested in the subject, and English is the language that most people know….

Some details about the language?
– It should be tab-oriented, as Python;
– It should be dynamic and strong typed, as Python;
– It should have strong visibility modifiers, as C++ and Java;
– Classes should be allowed to have static variables and methods;
– Classes’ instance variables should be explicitly declared;
– Will probably have multiple-inheritance;
– I want it to have operator overloading as well, but I don’t know if I’ll be able to do that😐
– I don’t have plans on building an interpreter or compile machine code (at least not yet). I’m creating a compiler that should compile JBoia to Java or C code, haven’t decided which one to use yet.
– I’m opened to suggestions, any of above could change with good reasons.

Although I like it very much and it’s by far the most interesting area of computer science in my opinion, I’m not an expert in language design. That’s why I’m looking forward to different commentaries and suggestions to help me on creating the best language I can.


class Cat:
      private:
            def name
            def age
            def kittens

            def static catCount = 0

      public:
            def Cat(name="Mimi", age=1, kittens=[]):
                  self.name = name
                  self.age = age
                  self.kittens = kittens
                  catCount += 1

            def getKittens():
                  return kittens

            def addKitten(cat):
                  if type(cat) == Cat:
                        kittens.add(cat)

            def getName():
                  return name

            def static howManyCats():
                  return catCount

main(args):
      c1 = Cat("Nana", 2, [])
      c2 = Cat()
      c1.addKitten(c2)
      print c1.getKittens()[0].getName()
      print Cat.howManyCats()

Should result in:
Mimi
2

Categories: English, Jeez, Programming
  1. May 23, 2007 at 12:32

    Love it so far…🙂

    Just let me know if u need anything🙂

  2. May 23, 2007 at 18:46

    >> – It should be dynamic and strong typed, as Python;
    In fact, Python is not strong typed. http://www.artima.com/intv/strongweak.html . They use what they call duck typing, which goes like this: “If it looks like a duck and quacks like a duck, it must be a duck.”
    A bit more of information: http://en.wikipedia.org/wiki/Duck_typing#In_Python

    >> – Will probably have multiple-inheritance;
    Inheritance is a bit overrated thing. And it can get very troublesome, too. I think a better idea would be to promote interfaces, a bit like Python (they don’t call it interfaces, but that is the idea). If you have a set of common method calls you don’t need to implement multiple inheritance.

    My R$ 0,02.

    http://steve-yegge.blogspot.com/2007/02/next-big-language.html

  3. May 23, 2007 at 18:54

    Oops, forgot to explain the last link. This guy wrote about the so called “the next big language” some time ago. If you can, take a look on the other posts from his blog too, you can get a lot of good ideas.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: