Path: ...!cyclone1.gnilink.net!gnilink.net!in.100proofnews.com!in.100proofnews.com!nntpfeed.zonnet.nl!news.cambrium.nl!news.cambrium.nl!skynet.be!newspost001!tjb!not-for-mail From: "Charles Melice" Newsgroups: comp.lang.forth References: Subject: Re: Forth "versus" Whatever Date: Fri, 6 Aug 2004 17:20:13 +0200 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 Lines: 60 Message-ID: <4113a1a9$0$316$ba620e4c@news.skynet.be> Organization: -= Belgacom Usenet Service =- NNTP-Posting-Host: 80.200.27.181 X-Trace: 1091805609 news.skynet.be 316 80.200.27.181:10148 X-Complaints-To: usenet-abuse@skynet.be "Doug Hoffman" a écrit dans le message de news:dhoffman-188AFD.21281001082004@journey.net.client.newsread.com... > 1) Forth vs Text files > A real Forth programmer only uses blocks files because you really > don't need text files and they don't embody the true spirit of Forth > minimalism. I use blocks in my text files: \ ---- logical block 1 ------ /nearly/ 25 lines \ ---- logical block 2 ------ ... etc ... > > 2) Forth vs Locals > A real Forth programmer will not use locals because they are a crutch. > True Forth code should only the stack. SWAP, DUP ... are locals. LOCALS reduce factorisation because the LOCALS usage is conceptually also a factorisation technique. A good /modern/ Forth programmer may use a mixture of LOCALS and stack words. What I do regularly without any problem. Some rules to use LOCALS: - a stack version don't look easy to do. - the contextual cost of the locals prologue/epilogue is neglictible. - avoid artificial factorisation. - clarify the source lisibility. One rule to not use LOCALS: - don't use LOCALS in general: respect the Forth philosophy. > > 3) Forth vs Structures > A real Forth programmer does not need structures. Everything that > structures can do can be done in Forth simply using offsets. Simpler, > smaller, better. Offsets are structures. Structures are offsets. Sometimes I use LOCALS as a tool to have STRUCTURE... > > 4) Others? Did I miss any? > > ;-) > > -Doug Charles