Close

Changing the language syntax

A project log for Dirac Programming Language

Aim: To build a compiler for my quantum language. In fact it is just a simple randomized stack based language that uses bra-ket notation.

luis-felipe-gomes-da-silvLuis Felipe Gomes da Silv 09/24/2022 at 10:390 Comments

I decided to be very rigorous about syntax.
I know it is quite boring and counter- 
productive to program in such conditions
However, I intend to be more precise,
even including irrational numbers. How?
You'll see! The fact is that mathematicians
do not care about production, but aim 
always for clarity of thought.
I see many languages that are quite easy 
to type, but in the end they are ambiguous
when we have many ways of doing something
instead of one.

The code goes like this:

program, teste.
variable, a is bra.
variable, x is matrix.
transpose(a).
c := mult(a,x).
print(c).
end, program.

Discussions