Am 13.06.2008 um 15:56 schrieb Phil Dawes: > Eduardo Cavazos wrote: >> Also, || and && might be doable as "smart combinators" and I >> believe Crest >> even coded up an implementation. So how do you feel about using smart >> versions of these instead of the arity variants? I believe you once >> mentioned >> that the problem you see is that they'll only work with quotations >> which are >> inferable. So do you think we should be conservative and stick with >> the ones >> we have now? >> > > Does making the arity explicit help code readability? I find it easy > to > follow multi-arty cleaves because the arity is explicit in the word.
Including it in the name forces you to explicitly define each supported arity, by having two degrees of freedom (input count and output count) implementing this approach without massic usages of unhygienc macros would become very unpractical. Passing it as parameters is at least a few tokens more to code and error prone (altought you could check with infer and throw understandable error messages not just something about unbalanced branches). I'm working on a implementation that will compile any sequence of quotations with the same stack effect height to effienct code and fall back to using with-datastack for quotations those stack effect can't be infered. ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk