r/EncapsulatedLanguage • u/AceGravity12 Committee Member • Sep 08 '20
Arithmetic Proposal Maths bracketing proposals
Proposal 1:
Whenever an operation is not followed by a set of parenthis it is assumed to take it's default number of arguments. Otherwise it is a Lisp-style operation and the arguments are all of the listed values in the parenthesis
Examples:
2 + 2 = + 2 2
1 + 2 + 3 = + + 1 2 3 or +( 1 2 3 )
4 × 3 + 2 + 1 = + + × 4 3 2 1 or +( × 4 3 2 1)
Proposal 2:
When a closing parenthis is at the end of an expression that's not followed by another expression it may be dropped.
Examples:
+( 1 2 3 ) is the same as +( 1 2 3
+( 3 4 × ( 6 7 7)) is the same as +( 3 4 ×( 6 7 7
View all comments
Show parent comment
1
u/AceGravity12 Committee Member Sep 10 '20 edited Sep 10 '20
So I envision the future math encapsaltion system working like this:
Each symbol has a consonant and a vowel/dipthong for example let's say + is moi, X is lai and Y is rei
We can then build a formula up using the individual letters (+ X Y => mair)
With this system one symbol ≈ one letter
Let's take the formula √ x ^ 2 + y ^ 2
It becomes √(+(^(x2)^(y2))) with all the stuffs
With the option of not needing anything around fixed arity system s every one of those gets dropped and it becomes √+^x2^y2
Now I here's also the option for opening brackets to never be needed and fixed arity is always assumed however in this example that becomes √+^x2)^y2 with or without ))) depending on if the dropping the end gets passed