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: A New Forth Date: Mon, 10 Oct 2016 15:11:02 -0700 Organization: A noiseless patient Spider Lines: 12 Message-ID: <87wphfsvm1.fsf@nightsong.com> References: <9dc136b0-5a06-4bad-b719-0e94358896f1@googlegroups.com> <1f740c55-e4d9-4e0f-993c-346e55ff7438@googlegroups.com> <87wphivdne.fsf@nightsong.com> <763508c2-cb4c-476f-96d1-95c603729e73@googlegroups.com> <87fuo6uyj6.fsf@nightsong.com> <8365d3af-11a1-4ef1-a414-60ee73964239@googlegroups.com> <8760p0tyl8.fsf@nightsong.com> <871szot0dg.fsf@nightsong.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="aa0316e652a4dc7590d93fe3855f85f3"; logging-data="1237"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/LdI7H/ZGOl219cK/3js0/" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:g5N8C47H76B5Aun3a2S6i16gGjw= sha1:ZNZ18rkEeqIeqYkJIsgwAu1w8uk= Xref: csiph.com comp.lang.forth:51746 "Elizabeth D. Rather" writes: > In my experience, words don't randomly return things of different > types... they do what their stack comments indicate, and those show > types to the extent there are any. To be sure, there are words like > DUP that are inherently untyped, I'd say DUP is polymorphic (takes a value of any type, and pushes a value of the same type); preferred Forth practice is that most or all words have static signatures like that. However, Trans is explicitly wanting arbitrary words to return types determined at runtime. This is sometimes done in dynamically typed languages but even then, it should only be done when there's a clear reason.