Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem: "builtins" files don't allow for computed constants #318

Open
yrashk opened this issue Jun 30, 2017 · 2 comments
Open

Problem: "builtins" files don't allow for computed constants #318

yrashk opened this issue Jun 30, 2017 · 2 comments

Comments

@yrashk
Copy link
Contributor

yrashk commented Jun 30, 2017

Currently, all "builtin" instruction files (currently using .builtins extension) with instruction / implementation pairs, handle these as rough equivalents of DEF. This works most of the time, except that in some cases it would be preferable to avoid recomputing values that are static in nature.

Proposed solution: find a way to have a notation for a semantic equivalent of SET and implement it

@yrashk
Copy link
Contributor Author

yrashk commented Jul 4, 2017

What if use different separators? Keep colon (:) for DEF and use something else for SET?

For example:

IF : [] IFELSE.

but

NUM = 1 2 UINT/ADD

or

NUM := 1 2 UINT/ADD

@yrashk
Copy link
Contributor Author

yrashk commented Jul 7, 2017

Most important question I can see here is "when will it be evaluated?" Sure, we can inject it into an Env on its first evaluation attempt, but how do we collect the result of it? What if there are more than one values on the stack after it's evaluated?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant