Jump to content

Recommended Posts

Posted

Hey, guys!
So, I've been thinking about making my own programming language that can be both interpreted and compiled and can run on web. For now, I've just made a web-app that converts arithmetic expressions to i486-compatible assembly and interprets them.
http://flatassembler.000webhostapp.com/compiler.html
So, what do you think is the next step?
I only have a vague idea of what the syntax should look like right now, I am planning to make it possible to use both S-expressions and infix notation for arithmetic expressions and only LISP-like syntax everywhere else.

Posted

"I only have a vague idea of what the syntax should look like right now ..."

That would be the place to start. First you figure out WHAT you want to build; then you figure out HOW to build it. Projects that reverse the order are doomed, since you have no basis for design decisions. You don't know what you want so you end up with something else, as they say. 

So first spec out your language. Doesn't have to be complete in every last detail, but get the broad outlines and main syntactic features nailed down on paper. Then the implementation will be far easier, since you are harnessing tools and techniques to a particular objective.

Posted
4 hours ago, FlatAssembler said:

So, what do you think is the next step?

Although it is a useful learning exercise to design and implement a new language, there are so many existing languages out there that I would try and think of a novel twist. (OK, probably not novel, but a little less common.)

For example, there is a bit of a shortage of languages that have rigorous, formally defined semantics so that it is easy to reason about the correctness of a program (if it implements a formal spec) or prove that two implementations are equivalent (e.g one that is easy to understand versus one that is optimised).

Or maybe a language with a good concurrency model (CSP?) built in.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.