esseks / monicelli

An esoteric programming language, come se fosse antani.
GNU General Public License v3.0
1.32k stars 52 forks source link

Add matrices to Monicelli #39

Open marcoxa opened 7 years ago

marcoxa commented 7 years ago

Hi

In English just for the casual github reader.

Can I propose a syntax for "arrays"?

tavola [al <variable>] [per <N>]*

So you can now declare a matrix 2x2 (using the usual C semantics) as

voglio una tavola al papero per due per due, Necchi

Then you can access it with

al posto <N> [e [al posto] <M>]* del <variabile>

To get the element in position 1, 1 in the previous example you can say

al posto uno e uno del papero

Which has a nice "mascettian" ring to it.

Just a thought :)

Cheers

MA

lo-bertolino commented 7 years ago

Instead of voglio una tavola al papero per due per due, Necchi I think that voglio una tavola al papero per due per due per il Necchi would fit better for no real reason, it just looks nicer to me

marcoxa commented 7 years ago

Yes. But it would make the parser more complicated and would change the declaration stile of other variables :)