|
From: Hugh A. <hug...@ya...> - 2015-07-14 04:40:42
|
I remember CURRY but didn't know about the '[ _ + ] notation. I never understood what the point of CURRY was --- why not just use the local variable name [ N + ] for readability? Anyway, where is the local-frame being held that it can persist after the function has exited? Is it on the heap like in Scheme/Lisp? Will it get GC'd eventually? My FMITE is intended to be a micro-controller used for real-time programs. I think that GC is a no-go for real-time programming. I've already been "beat up" by Pascal Bourguignon on comp.lang.lisp for saying that GC is a no-go for real-time (https://groups.google.com/forum/#!topic/comp.lang.lisp/-nWfXAs_4ug). Languages such as Factor and Lisp are cool --- but I don't foresee them ever being used in real-time micro-controllers --- these are for desktop-computers. Slava once told me that the ColdFire was the smallest processor he could foresee Factor running on --- but that is a gigantic expensive processor! --- and he wasn't talking about real-time programming anyway, but he was thinking of Factor being a scripting language for smart-phones. The FMITE is intended to be used as a micro-controller. How much of Factor could be implemented on the FMITE as part of LOTD? I would hope that 90% of Factor could be integrated into LOTD, with the other 10% being conveniences (anything relying on GC or dynamic-typing) that weren't critical anyway. regards --- Hugh On Monday, July 13, 2015 7:20 PM, John Benediktsson <mr...@gm...> wrote: These mean the same thing: : add-quot ( n -- quot ) '[ _ + ] ; : add-quot ( n -- quot ) [ + ] curry ; :: add-quot ( n -- quot ) [ n + ] ; They are basically different ways of currying the 'n' argument into the quotation that is produced by ``add-quot``. Best,John. |