I have a plan to create a programming language

Hello, I am an admin of Rollpie. I am a huge fan of Python and has developed this website with Python. No doubt I love Python but I have a plan to develop a new language.

There are so many languages in the tech world including Python, C#, Java and most skilled developers may wonder when human beings will stop creating new one.

My own project is a 5 years plan. The first year, 2022, is drafting an system outline or grammatical style of a new language. This article is that publication.

Basically Python but more simple

My biggest hope is removing "def" word from defining a function like

add(x, y):
    return x + y

This format is so simple and beautiful. If Python Foundation picks up this grammar, I will stop planning a language.

I don't feel so good to see defining a parent class like

class Human(Animal):
    def __init__(self):
        pass

Why do I write round brackets? The class inheritance is not a function. But I have not found the best style to declare it.

"return" is also not my like. There should be a more precise word or symbol. I think it may be ">" but it's a little ugly. If you agree with my feeling, please comment on that matter.

So now I write down the critical points of my new language.

Remove "from" and "import"

"import" is a very old and traditional style from C. But my philosophy of beauty loudly cries it is not rational.

+ pathlib.Path
+ datetime.timedelta
+ flask.render_template

main():
    return

I will be so happy if "import" changes to "+". This symbol means adding and importing is adding objects or functions from outside.

Remove "def" from defining a function

That was said before.

Remove "class" from defining a class

If a function declaration doesn't have "def" word, a class one shouldn't have "class".

Student:
    say_hello():
        return "hello"

time, datetime, calendar...

I want to integrate these libraries into "time". Most programming languages tend to create various confusing modules like stuff but time related functions should be developed carefully so programmers can easily import them.

Continued...

Comments

Powered by Markdown

More