Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #34836
| From | "WJ" <w_a_x_man@yahoo.com> |
|---|---|
| Newsgroups | comp.lang.forth |
| Subject | Re: How popular is Forth really, compared to others, any guess? |
| Date | 2014-12-07 21:50 +0000 |
| Organization | A noiseless patient Spider |
| Message-ID | <m62i2m$j23$1@dont-email.me> (permalink) |
| References | (4 earlier) <74GdnU-dDdjlodXJnZ2dnUU7-cOdnZ2d@supernews.com> <m2dh0o$v3u$1@online.de> <839fb41b-4ccf-403b-a6e7-a0d572ae79dc@googlegroups.com> <ieKdnQzq5JNgGR_JnZ2dnUU7-VmdnZ2d@supernews.com> <cf5d22cb-6cf2-4740-a40d-6e63f185b35c@googlegroups.com> |
hughaguilar96@gmail.com wrote:
> That "Forth Programmer's Handbook" was written at a
> time when (LOCAL) would crash SwiftForth if used ---
> Elizabeth Rather didn't know what local variables were
> either ---
Locals are important. In the thread on summing the squares of
the two largest integers of three, this appeared:
> In that thread, Payson posted this code:
>
> : sq ( n -- n ) dup * ;
> : g ( a b c -- n ) 2dup max sq >r min max sq r> + ;
>
> That was the best, I thought.
Let's put all of that code on one line:
: sq ( n -- n ) dup * ; : g ( a b c -- n ) 2dup max sq >r min max sq r> + ;
Now, let's rewrite it using locals:
: g { a b c -- d } b c max dup * b c min a max dup * + ;
Easier to write, easier to read, easier to understand, easier to debug,
and shorter.
However, some Forth groupies have a mystical belief in the wickedness
of local variables and the holiness of obfuscated stack-juggling.
Some Forth groupies are unwilling or unable to learn anything except
the lowest-level concepts.
Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
How popular is Forth really, compared to others, any guess? JUERGEN <epldfpga@aol.com> - 2014-10-21 04:50 -0700
Re: How popular is Forth really, compared to others, any guess? Mark Wills <markwills1970@gmail.com> - 2014-10-22 02:37 -0700
Re: How popular is Forth really, compared to others, any guess? "Elizabeth D. Rather" <erather@forth.com> - 2014-10-22 09:57 -1000
Re: How popular is Forth really, compared to others, any guess? Jason Damisch <jasondamisch@yahoo.com> - 2014-10-22 14:11 -0700
Re: How popular is Forth really, compared to others, any guess? Paul E Bennett <Paul_E.Bennett@topmail.co.uk> - 2014-10-22 23:08 +0100
Re: How popular is Forth really, compared to others, any guess? "Rod Pemberton" <buzzoff@nonamewhichexists.cmm> - 2014-10-22 23:02 -0400
Re: How popular is Forth really, compared to others, any guess? "Elizabeth D. Rather" <erather@forth.com> - 2014-10-22 18:26 -1000
Re: How popular is Forth really, compared to others, any guess? Paul E Bennett <Paul_E.Bennett@topmail.co.uk> - 2014-10-23 21:32 +0100
Re: How popular is Forth really, compared to others, any guess? Bernd Paysan <bernd.paysan@gmx.de> - 2014-10-22 23:14 +0200
Re: How popular is Forth really, compared to others, any guess? "Elizabeth D. Rather" <erather@forth.com> - 2014-10-22 13:23 -1000
Re: How popular is Forth really, compared to others, any guess? Bernd Paysan <bernd.paysan@gmx.de> - 2014-10-24 14:34 +0200
Re: How popular is Forth really, compared to others, any guess? beeflobill@gmail.com - 2014-12-05 12:28 -0800
Re: How popular is Forth really, compared to others, any guess? Paul Rubin <no.email@nospam.invalid> - 2014-12-05 12:44 -0800
Re: How popular is Forth really, compared to others, any guess? rickman <gnuarm@gmail.com> - 2014-12-05 16:20 -0500
Re: How popular is Forth really, compared to others, any guess? Jason Damisch <jasondamisch@yahoo.com> - 2014-12-05 13:43 -0800
Re: How popular is Forth really, compared to others, any guess? "Elizabeth D. Rather" <erather@forth.com> - 2014-12-05 18:24 -1000
Re: How popular is Forth really, compared to others, any guess? Jason Damisch <jasondamisch@yahoo.com> - 2014-12-06 10:23 -0800
Re: How popular is Forth really, compared to others, any guess? hughaguilar96@gmail.com - 2014-12-06 18:24 -0800
Re: How popular is Forth really, compared to others, any guess? rickman <gnuarm@gmail.com> - 2014-12-06 22:59 -0500
Re: How popular is Forth really, compared to others, any guess? hughaguilar96@gmail.com - 2014-12-06 21:03 -0800
Re: How popular is Forth really, compared to others, any guess? rickman <gnuarm@gmail.com> - 2014-12-07 04:14 -0500
Re: How popular is Forth really, compared to others, any guess? Julian Fondren <julian.fondren@gmail.com> - 2014-12-07 09:04 -0800
Re: How popular is Forth really, compared to others, any guess? hughaguilar96@gmail.com - 2014-12-07 19:23 -0800
Re: How popular is Forth really, compared to others, any guess? hughaguilar96@gmail.com - 2014-12-07 19:30 -0800
Re: How popular is Forth really, compared to others, any guess? "WJ" <w_a_x_man@yahoo.com> - 2014-12-08 09:35 +0000
Re: How popular is Forth really, compared to others, any guess? awegel@arcor.de (Alexander Wegel) - 2014-12-08 12:53 +0100
Re: How popular is Forth really, compared to others, any guess? JUERGEN <epldfpga@aol.com> - 2014-12-08 14:11 -0800
Re: How popular is Forth really, compared to others, any guess? awegel@arcor.de (Alexander Wegel) - 2014-12-09 00:02 +0100
Re: How popular is Forth really, compared to others, any guess? "WJ" <w_a_x_man@yahoo.com> - 2014-12-07 21:50 +0000
Re: How popular is Forth really, compared to others, any guess? Bernd Paysan <bernd.paysan@gmx.de> - 2014-12-07 23:00 +0100
csiph-web