JohnEarnest / ok

An open-source interpreter for the K5 programming language.
MIT License
587 stars 72 forks source link

Reserved functions #9

Closed refi64 closed 8 years ago

refi64 commented 9 years ago

K normally had the reserved functions for things like math operations and _vs. Could oK implement some of these?

JohnEarnest commented 9 years ago

oK specifically aims to emulate the behavior of K5, the bleeding-edge in-progress iteration of K. Some of the equivalents of k3/k4 reserved functions are currently unknown (or intentionally removed), but some are known- including exp log sin and cos. I will work to add these in the future.

JohnEarnest commented 8 years ago

iKe now contains examples of a way to introduce JS-native dyadic or triadic functions without altering the behavior of the interpreter by inserting the functions into the verb dispatch table and then wrapping them in a function "trampoline" which ensures their arguments can be properly curried. This approach may remove the need for the "native" type entirely.

I think the functionality currently in oK is sufficient to match k5, so far as we know, so I'm going to consider this issue closed.