proj-oot-old-150618-ootSyntaxTable

CURRENT BEST GUESS SYNTAX

syntax (ordered by approximate descending ease of typing):

a/b/c: infix, prefix, postfix (todo in many entries i wrote it prefix/infix/postfix)

-	subtraction/unary negation/boundary?   note: also valid within identifiers						
=	__set//
()  	parens//  ; note: x( )x is parens parameterized by x
;   	eol//
'   	option type unwrap with args/option type wrap/option type unwrap ; also, quote labels ("'LABELA")
,   	(autoconstructor-contexting)separator/lazy/strict
.   	reverse and group ie "attribute access"/(either .keyword or .consish (eg +. would be cons))/elementwise
/   	bind ie label
--	tight binding -1, eg 0..4-- == 0..(4-1) (more useful: 0..x--); OR maybe comment-to-EOL
==  	
;;	end of block
''      ?string
,,	multidim separator/?/?
..  	something like reverse and group?/?/?  OR range (eg 1..3 == [1 2])
//	comment to EOL; OR mb separator between guard and branch in switch statement and similar constructs
!	/strict? parallelize? anti-parallelize? get started now (eager evaluation)? unlifted? golang-style channel?/   	
%	division? python's interpolation operator, possibly with syntactic sugar for x % (a,b)?
&	/impurity, aliasing | addressof/
*       multiply/?/?
_   	dummy arg (in argspec) or anonymous autolambda autovariable/privacy (unexported)/?
+	concat (and addition)/?/?  mb infix + is short for parameterized parens around a single element, eg e+x is short for e( x )e
{}   	block (like parens, but doesnt autoclose, and also defines a scope)
:	grouping bind? type annotation to EOL?
"	?string
<   	less than/?/?
>   	greater than/?/?
?   	?/metavariable?/?
[]	graph constructor		note: not in ISO 646, but is in T.61	
|   	pipe  				note: not in ISO 646, but is in T.61	
@   	?/view? node label eg node annotation of color 'name' eg Haskell-style at-binding?/?			note: not in ISO 646, but is in T.61	
#	comment-to-EOL, at least on first few lines | ?/footnote defn|len/footnote use? view? reserved for DSLs? |strict	note: not in ISO 646, but is in T.61							
$   	?/metaquote? /interpolate? metavariable? antiquote?	note: not in ISO 646, but is in T.61	
\   	escape EOL or other character				note: not in T.61
`	argspec?			not in T.61
^   	(eol?) annotation/node annotation (x^annotationType:annotation) /?	note: not in T.61
~   					note: not in T.61, apparently hard to type
!!	
%%  	
&&      
**	exponentiation?	
__  	
++	tight binding +1, eg 0..x++ == 0..(x+1)
::  	type annotation to EOG (end of group, eg EOL or close parens or close bracket) (would like a single char for this?)
""	
<< >> 	type annotation? character meta, or use <<< >>> for that?
??  	
@@				       note: not in ISO 646, but is in T.61
##	?/far footnote?/far footnote?  note: not in ISO 646, but is in T.61
$$	anon fn helper? interpolation operator?/?/?	  	       note: not in ISO 646, but is in T.61
||	pipe with args		       note: not in ISO 646, but is in T.61
^^	edge annotation
"""	HERE document/multiline string//
${}     interpolation of arbitrary expressions (as opposed to single identifiers)
""[]	autostringify array constructor
-#      lazy

lowercase    variable; cannot be string-matched by metaprogramming
UPPERCASE    label; or, annotation that is not also an identifier
Capitalized  language/DSL (macro) keyword? or Ruby-style keyword? or, annotation that is also an identifier
x, x1, ..    default variable names for anonymous functions (should this be _, _1, ..?)
X, X1, ..    some sort of metaprogrammy variable names (ie these are treated as Capitalized, not UPPERCASE)


potential alpha ids for some things you might think would be punctuation:
div	division (but mb %)
pow	exponentiation (but mb **)

.+ append to list ([1 2] .+ 3 == [1 2 3]   (should we also have a CONS, that preappends at location 0, or is APPEND enough? mb +. is cons, .+ is append?) BUT this would conflict with using prefix . as 'elementwise' (syntactic metaoperator for map) as in OCTAVE
+- and -+: cons and append? but then postfix - isnt a generic 'marker'.. mb that's okay though, make you use a 'section' to mark punctuation, eg (+)- for a marked '+'. Should it be 0 +- [1 2] but [1 2] -+ 3, or should the list be on the left in both cases? 0 +- [1 2] but [1 2] -+ 3 is not totally irregular, the way to remember it is that in both cases, the left-to-right position of the elements is the same as they will be in the resulting list
+, and ,+: cons and append? but then , is not lazy/strict

THINGS LOOKING FOR SYNTAX

infixify

'such thats' in patterns (mb something like '?-' ?)

J-style forks

need syntax to turn 'for' (foreach), which is by default parallel, into sequential

similarrly, need notation for reduce when it is non-commutative or even non-associative (fully sequential), because by default reduce is parallel and unordered

See also the older version, [1], which has a bunch of things which are looking for syntax.

probably should reserve a prefix for metaprogrammable punctuation

compiler directives

metadata directives


note: in earlier versions i looked at presence in ISO 646 and T.61 as one measurement of 'easy to type'. But [] is not in ISO 646 (but it is in T.61), and i think {} is not even in T.61. I think we can't really do without frequent [] and {}, and any programmer already has to get a keyword to work with these for other languages. So maybe i should start ignoring ISO 646 and T.61.

note: it seems that a common pattern is for the infix variant of something to mean one thing, and for the prefix/postfix variants to mean two things completely unrelated to the infix variant, but related to each other. Which suggests that we separate the above table into 2 (infix, and prefix/postfix).

---