Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Apparently it's called "either" and it doesn't evaluate every arm.

So, explain to me how that is a function and not a special form?



REBOL-family languages (including Logo) don't eagerly evaluate expressions like a Lisp, and therefore can use ordinary functions/operators in places that would otherwise need to be special forms and/or macros.


Exactly ... I tried to explain this here: https://ryelang.org/meet_rye/basics/if_either/


So, you're passing around textual source code chunks? How do you force evaluation?

I don't find this impossible. I have seen this in John Shutt's Kernel, for example. https://ftp.cs.wpi.edu/pub/techreports/pdf/05-07.pdf

But I'm just not seeing the mechanisms I expect for such a language.


Not strings; token lists.

You can evaluate lists with `do`, or through functions which in turn use `do` on their arguments.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: