Posts

Showing posts from May, 2022

Wikichain in Protonium

    module wikichain         class wikichain             block             chain             pro block -> add                 block + chain -> chain             pro read                 last@chain -> block                 return block                  pro main             wikichain -> wkchn             while in ...

File processing in Protonium

module processing     pro main         f -> file "aorus.txt" r txt         ff -> file "result.txt" w txt         f -> open         ff -> open         while !eof@f             f -> line -> processing -> ff         f -> close         ff -> close     pro line -> processing         0 -> i         "" -> lline         while !eol@line             line[i] + 10 -> lline[i]         return lline // end module     // check if file...

Human & Programming Languages

In new Syntax for Programming Languages logic as an elements are going from left to right. Before, logic went from right to left. It is like ancient languages. Archaic Latin in 500 bce was also written from right to left. Only couple hundreds years later in 1 ce they started writing it (Roman Latin) from left to right.

New Syntax for Programming Languages

Regular assignment statement is usually read from left to right but its logic is going in opposite direction, rvalue is going to be assigned to lvalue, not vs versa. Same with object-oriented notation. Logic there is going from right to left too. Because we looking first for the rightmost subclass of the class, then one higher until uppermost class in hierarchy. So it makes sense to offer different more natural syntax where elements as a logic flow from left to right. For assignment it will be a - b -> a instead of a = a - b and for object-oriented notation m@b instead of b.m