I'd wondered why.
I think this point needs emphasising - coming from virtually
any programming langage one expects that function calls
to be nestable the BIG surprise was that "<<" ">>" didn't have to be properly balanced and that the scope of the macro was not what I thought it was.
I guess this is not changable now - since it would break
all old macros.
Actually to make macros composable it would be
very nice to pipe the output of the first macro into a second.
This is done in the language 'elixir' using the notatation '|>'
to represent a pipe operator.
In TW you could think of writing:
<<macro1 .. args>> |> <<macro2 arg1 arg2>>
which means take the output of <<macro1 ... args>>
stick it into a temporary variable (say t1) then evaluate
<<macro2 t1 arg1 arg2>>
The pipe operator injects the result of the first macro into the
first argument of the second macro.
This is actually very nice - since it eliminates nested function calls.
So things like:
f(g(h(i(X))) become pipes like this:
i(X) |> h |> g |> f
And I guess it would not break old code - since old code would
never have used a |> symbol :-)
I'm not sure if this is possble - but a pipe notation often beats
nested function calls for simplicity :-)
And pipes are nice as abstractions for different reasons.
Cheers
/Joe