| Deutsch English Français Italiano |
|
<8734bfzrdl.fsf@nightsong.com> View for Bookmarking (what is this?) Look up another Usenet article |
Path: news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Paul Rubin <no.email@nospam.invalid> Newsgroups: comp.lang.forth Subject: Re: Parsing timestamps? Date: Tue, 01 Jul 2025 11:40:38 -0700 Organization: A noiseless patient Spider Lines: 32 Message-ID: <8734bfzrdl.fsf@nightsong.com> References: <1f433fabcb4d053d16cbc098dedc6c370608ac01@i2pn2.org> <2025Jun23.071834@mips.complang.tuwien.ac.at> <a004d0f4acf945e054db77d86a4544fc@www.novabbs.com> <nnd$0d7645ea$11a210a3@2cd6ffa4d9a3008a> <4a4c38c99d22d97314ed5750af38430d@www.novabbs.com> <765bd244e1368b5691f18c748102470e8de1a30d@i2pn2.org> <nnd$0deda869$2559e613@c251414cde7edbe7> <103ilab$225q0$1@paganini.bofh.team> <cda70ea80eb98069a3060f95503d0853@www.novabbs.com> <2025Jun29.171314@mips.complang.tuwien.ac.at> <96f3b6d94af924cf1468a2cced37966d@www.novabbs.com> <d5ff6c298dff84dabc278ac1a28087d55126645e@i2pn2.org> <0cd5e9d5959101c1efa68a2d6d630e23@www.novabbs.com> <069f09501a3c6fcade18fdf83925d835514b42cc@i2pn2.org> <44b5f13fd49d8ddbd572ae583379d124@www.novabbs.com> <21113c70c36a86f0fd4c74c8d11d0947528ba70f@i2pn2.org> <20baae7dd561db60967a5937d2b59d9a@www.novabbs.com> <0db20ddf954106bbca40d9e83630033f108b9a8e@i2pn2.org> <87bjq5yn8i.fsf@nightsong.com> <nnd$6da712e9$10ba1712@89d620b4a5dddb34> MIME-Version: 1.0 Content-Type: text/plain Injection-Date: Tue, 01 Jul 2025 20:40:39 +0200 (CEST) Injection-Info: dont-email.me; posting-host="dd4d41ff1535f3f9a54ff9cebbdbb569"; logging-data="3153170"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18aBN/V/Vk0hAL75usT+n87" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) Cancel-Lock: sha1:689jOV3HX6NInIiFAM3/QFAwAuY= sha1:GsZ2Rw4pPCb5Vwl5Ww8p2aq7Sa0= Hans Bezemer <the.beez.speaks@gmail.com> writes: >>> But such would indicate a deficiency in Forth. Do C programmers reach a >>> point at which they can't go forward? ... > Another great argument to leave Forth and embrace C! Why painfully > create kludge to cram into a language that was clearly not created for > that when you have a language available that was actually DESIGNED > with those requirements in mind?! I'm not sure what you're getting at here, though I see the sarcasm. Is the kludge locals? They don't seem that kludgy to me. Implementing them in Forth is straightforward and lots of people have done it. The point where one can't go forward is basically "running out of registers". In assembly language those are the machine registers, and in Forth they're the top few stack slots. In both cases, when you run out, you have to resort to contorted code. In C that isn't a problem for the programmer. You can use as many variables as you like, and if the compiler runs out of registers and has to make contorted assembly code, it does so without your having to care. In a traditional Forth with locals, the locals are stack allocated so accessing them usually costs a memory reference. The programmer gets the same convenience as a C programmer. The runtime takes a slowdown compared to code from a register-allocating compiler, but such a slowdown is already present in a threaded interpreter, so it's fine. Finally, a fancy enough Forth compiler can do the same things that a C compiler does. Those compilers are difficult to write, but they exist (VFX, lxf, etc.). I don't know if locals make writing the compiler more difficult. But the user shouldn't have to care.