1.0 KB

Methods - ideas for implementation


parenthesis were originally meant to group anything. both math and lists. Also originally newlines can separate items, or commas within the same lines. Unfortunatly, it would be difficult to differentiate between math and a list this way.

	a = 3
	b = a * (
		9 + 8

it could act the same as the normal scope, but this is where normal math groupings become a problem. If it's a math grouping, it is meant to allow going across multiple lines.

One solution would be to only allow explicitly writting lists. Like []

l = [
vars = [
	a = 1
	b = 2, d = 12
	d = (3 + 2) * 5
double = [n] => n * 2

This solution does make things easier. Now parenths are purely for grouping and for allowing expressions to go across lines And lists are easier to implement

Parenths will contain 1 tree across lines. Lists will contain any number of trees, with a new tree at each new line or comma. Commas can be used at the end of the lines if wanted