| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#11
| |||
| |||
| On Aug 21, 2:37*am, astrobe <fduboi...@gmail.com> wrote: > > Your "factored" DO/LOOP doesn't offer an index variable, so it's not a > > replacement for DO/LOOP. *You could of course come up with a > > equivalent for words like I and J and helper functions to allow > > providing the index and limit... but the result would be much more > > clumsy. *There might be some value in this if you routinely find your > > loop bodies are typically single Forth words. *Otherwise, you're going > > to be forced to create names for your loop bodies or quote them > > with :NONAME. *Ick. > > Bad mood, John? Not particularly, so let's review. Someone posts a message stating DO/ LOOP is factorable. The code posted doesn't replicate the behavior of DO/LOOP (as it doesn't maintain an index variable) so I point that out that a claim of factorability of DO/LOOP was not demonstrated (as claimed in the subject line). I also point out that the obvious and unremarkable consequences of his code-- that loop bodies had to be defined as words, forcing naming loop bodies (an issue I also have with LSE64) or using Forth's ugly :NONAME. > One may see a prototype of iterators, or map/reduce/filter/fold > implementation. If one moves those XTs to the return stack of course. And the next time someone's personal journey of discovery leads to using deferred variables to drive behavior based on context, we can claim it's a prototype of polymorphism. |
|
#12
| |||
| |||
| [...] > > One may see a prototype of iterators, or map/reduce/filter/fold > > implementation. If one moves those XTs to the return stack of course. > > And the next time someone's personal journey of discovery leads to > using deferred variables to drive behavior based on context, we can > claim it's a prototype of polymorphism. Yes! Glad to see you're friendly and supportive again! :-) Amicalement, Astrobe |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.