I'm thinking of designing a programming language.

I want it to have easy to read syntax like python. Inheritance and interfaces like java. More advanced concepts like pointers and memory management like c++.

I was originally going to write my own compiler but I figured it's not worth reinventing the wheel. So the current plan is to basically just create a parser that turns a source file into c++ code and then that is compiled with g++. The only problem I can think of with that is catching runtime errors.

How does this language sound?

My purpose is to have a language that is as easy to read as python but with the speed of a compiled program and the ability to use it for embedded projects. I feel like reading larger C++ projects can be quite time consuming. So I figure the trade off of taking a little longer to write the code to make it more obvious what is going on is better than having a lot of syntax that can be tough to walk though the logic of (I find this often with c and c++, not like I don't figure it out but It definitely takes longer than it does to read and understand python)

  • 1
    Btw I do know what cython is but it does not do exactly what I wished it would
  • 1
    Python is a scripting language, albeit a powerful one. Having pointers and memory management on a python-like syntax would be very cumbersome to implement and could cause numerous compiling errors, going from the assumption you're going to *actually* design a compiler.

    Stick to C/C++ for the memory management and have your own libraries ready with scripts to shorten frequent non-complex tasks and you'll be mostly fine.
  • 1
    We are all going to love it because it's new, and we will all hate it because it has terrible docs and no answers on StackOverflow.

    See acting advice from Robin Williams. It doesn't matter what we think, just do it.
  • 0
    There exists a Python-like syntax overlay for the D language which might serve as an example of what is possible. I forget what it is called, but it sounds an awful lot like what you describe. (I came across it a couple years ago and didn't save the link.)
Add Comment