emdash / udlang

A practical, functional language for stream processing.
GNU Lesser General Public License v3.0
1 stars 0 forks source link

const functions #50

Closed emdash closed 2 years ago

emdash commented 3 years ago

Basic idea: distinguish between const functions non-const functions.

const functions cannot be called on a runtime value, so placing them a space that can be safely used at compile time.

A const function can only called on a value known at compile time. Perhaps with some other restrictions, we can guarantee termination.

Const functions can be used as interpreter / compiler hooks.

emdash commented 2 years ago

This is irrelevant now that I've decided to narrow the focus of uDLang. All functions in uDLang are now effectively equivalent to const functions, because the out keyword is being re-defined.