Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Julian Fondren Newsgroups: comp.lang.forth Subject: Re: multi-threading in Forth? Date: Sun, 07 Aug 2011 01:43:54 -0500 Organization: A noiseless patient Spider Lines: 56 Message-ID: <86ipq94t79.fsf@gmail.com> References: <07679799958436@frunobulax.edu> <4e3aa6ce.690183008@192.168.0.50> <8662mb5rw8.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx04.eternal-september.org; posting-host="cO8zBIpB9LiP7q+vFZIJrA"; logging-data="21440"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18OzquFeykdcBDrjK/MVBrrIiGyLSXWO4s=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (windows-nt) Cancel-Lock: sha1:MJo6WXB2qMh9mLdZoyHsXvLUVfU= sha1:ke4S9HOO1mWUpl9NOn13/hT0g/w= Xref: x330-a1.tempe.blueboxinc.net comp.lang.forth:4632 Andrew Haley writes: > > What is CALL ? > : call >r ; m_l_g3 calls it ENTER > They're both hard to understand and maintain. What's wrong with > > -too-small if -not-forth if type space then then > > ? Golly, even a Forth beginner could understand what that does . We > can't have that! :-) > : -too-small ( c-addr u -- c-addr u 0 | -1 ) ... ; : -too-small ( c-addr u -- c-addr u f ) ... ; Neither word follows the "consume all inputs" norm, but compared to what I went with... > Yes. Conventional is good. The maintenance programmer's time is > valuable. Think about it for a moment: on first sight, how long would > it take the reader to figure out what these programs do? Remember, > you're writing code to be read. > > There's an old saying that appears in many forms, one of which is > "Don't use a ten dollar word when a nickel one will do." This is good > advice when writing English, and terrific advice when programming. > People learning English often use heavyweight synonyms and complex > structures they've learned. That's good while learning, but it's also > a sure sign of someone not very fluent with the language. > > A maintenance programmer has a reasonable expectation that a > heavyweight technique will only be used when demanded by a heavyweight > problem. When they find otherwise there's a kind of cognitive > dissonance (talk about 10-dollar words!) that forces a break in > concentration. It also forces them to step away from the problem they > were trying to solve in order to learn how your custom control > structures work. > > This is not general advice against custom control structures, which > are one of Forth's strengths. But it's important to realize that, > while they can simplify code and make it more readable, there is a > cost. A wise programmer balances costs and benefits, and uses > powerful techniques sparingly. Thanks for this :-) The middle paragraphs are persuasive enough for me. > Andrew.