something like:
if OrdinaryCondition?: DoOrdinaryThing? else: DoExtraordinaryThing?
should be transformed to use a footnote:
usually when OrdinaryCondition do DoOrdinaryThing #1
better:
OrdinaryCondition except #1
the latter allows footnotes to have structure so that they can contain both the condition, and also the thing to do if the condition is not true:
IF: ExtraordinaryCondition THEN: DoExtraordinaryThing
also as a special case, things like
if x is not None: y = doSomething else: y = None
should have a library function, e.g.
y = doSomething except #1
or something similar should work for that
instead of 'except' operator in main code, could just always have structured footnotes (default/unstructured/footnote with only one unlabeled element just inserts code like a C #DEFINE), with optional advice (BEFORE, AFTER) and condition (COND or maybe just IF). maybe could also use as function decorators. a footnote at the end of the line applies to the whole line, otherwise it wraps the function immediately to its right. what else?
can we make a subturing metaprogamy language for types of advice, e.g. that encompasses BEFORE, AFTER, COND, y = COND or None? mb a control flow graph?