You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 11, 2021. It is now read-only.
Recently I was playing with a new keyword defined so we can check up front if a word is already defined, so we can for example avoid including a file twice or change the library behavior if some macro is already defined.
But for this happen I should have the ability to redefine a macro, something like this.
defined std.porth 0 = if
macro std.porth 1end
...
end// defined std.porth
or
defined SOMETHING 0 = if// if SOMETHING is not defined
macro SOMETHING 69end// define a default value in case of SOMETHING is undefined end
I don't know if this new keyword will be useful, but I think the ability to redefine a macro should be possible. What you guys think about it? Should macros behave like a constant expression?