Dialected Function Calls, OF, and LOG(ARITHM)

There's an interesting intersection between dialected function calls and the workings of OF.

What if we say it's LOG-OF (and LOGARITHM-OF). This would leave the word LOG free in global space.

log: func [x] [print ["Logging:" mold x]]

1 + log of 1000  ; would still work, relies on LOG-OF not LOG 

Then... what if you can dialect the call to LOG-OF to ask for bases.... and what if OF proxies these things into the call?

1 + log/e of 1000         ; English-like "one plus log base e of 1000"

That would be dispatched by OF to act like:

1 + log-of/e 1000  ; OF keeps the path intact on the new call

It could actually receive the literal letter e and know to use a mathematical natural logarithm function, vs. being stuck with looking up the definition of what e and needing that to be defined (and then lose precision by not using the right function).

It's a literate-looking pattern:

1 + log/10 of 1000        ; "one plus log base 10 of 1000"
1 + log/2 of 1000         ; "one plus log base 2 of 1000"

:thinking:

2 Likes