Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Paul Rubin Newsgroups: comp.lang.forth Subject: Re: Stack Operator Symbols Date: Sat, 29 Oct 2016 00:46:20 -0700 Organization: A noiseless patient Spider Lines: 18 Message-ID: <87d1ijmwc3.fsf@nightsong.com> References: <4e481228-bd80-4e39-a629-90a690e50756@googlegroups.com> <20161027191345.4f524e44@_> <-Lmdneii--uHXI_FnZ2dnUU7-VnNnZ2d@supernews.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="34d41c0ea8a77aa9d2fd90d699221b0e"; logging-data="22442"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+ZmNxOatQhiXIzy2FADJGQ" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:xZL8F5VChdFcLBx4YnzyDvacaJ8= sha1:egaacMvwSCqoBnRf10ReH6/QrEE= Xref: csiph.com comp.lang.forth:52283 "Elizabeth D. Rather" writes: > I wrote Forth professionally for 30 years without using PICK, ROLL, or > -ROLL, suffering zero inconvenience. I needed a 3DUP word recently, and wrote something like: : 3dup ( a b c -- a b c a b c ) >r 2dup r@ -rot r> ; Later I saw someone else's implementation: : 3dup ( a b c -- a b c a b c ) 2 pick 2 pick 2 pick ; which I thought was much more symmetric and natural. Of course for non-purists, : 3dup { a b c } a b c a b c ; is the simplest of all.