| Deutsch English Français Italiano |
|
<bf84de6784252147956c226ceea77d8f@www.novabbs.com> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!weretis.net!feeder9.news.weretis.net!news.nk.ca!rocksolid2!i2pn2.org!.POSTED!not-for-mail From: mhx@iae.nl (mhx) Newsgroups: comp.lang.forth Subject: Re: "The Best Programming Language for the End of the World" Date: Wed, 16 Apr 2025 13:59:44 +0000 Organization: novaBBS Message-ID: <bf84de6784252147956c226ceea77d8f@www.novabbs.com> References: <87bjtn2hct.fsf@gmail.com> <1b8e7e1b9809c3d36399ceb5438212d9@www.novabbs.com> <nnd$04d507db$41da3ebe@d87d02f63752697b> <d7e4a431359d3a254cbdeb6e7ca8d516e93472ad@i2pn2.org> <nnd$0600983e$3ca65ad8@8f55bfe0cb682bb7> <2025Apr15.171732@mips.complang.tuwien.ac.at> <dd55bec1ebb7aab808238c85e4387516@www.novabbs.com> <2025Apr15.235921@mips.complang.tuwien.ac.at> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: i2pn2.org; logging-data="604209"; mail-complaints-to="usenet@i2pn2.org"; posting-account="J+nubxJRM7ncpF4l6KLO+OONWmFAYJHVJegfwQXJ8vc"; User-Agent: Rocksolid Light X-Rslight-Posting-User: 4e0dc1fdad1ead10b39e7eb5db19bf73d73e3ab3 X-Rslight-Site: $2y$10$g1E3Plcpqow8hd03ozSrQ.LTiYfQ9tBvLNKUsBbx/oYp3tpsD2wSa X-Spam-Checker-Version: SpamAssassin 4.0.0 Bytes: 2391 Lines: 33 On Tue, 15 Apr 2025 21:59:21 +0000, Anton Ertl wrote: > mhx@iae.nl (mhx) writes: >>> 1_0 2_0 + . \ output: 30 >> >>Sorry, I really don't like this. It takes away my >>underlying mental model of how things should work. >>What happens for "10_ 20_ + ." ? > > It outputs 30, too. The intended use of _ in Gforth is like this: > > 100_000_000_000 20_000_000_000 + . \ outputs 120000000000 > > or with groups of 4 for those environments where that is conventional. > > What does your underlying mental model say how things should work? My mental model (in a basic Forth context) recognizes a pattern where '_' means '.'. The output of 1.0 2.0 + . then probably intends to be 1.0 2.0 d+ d. (the reason for '_' is the wish to process numbers with embedded decimal point). Numerically the output is then '3' or maybe '3_0', or '3_00', but never '30.' Your example > 100_000_000_000 20_000_000_000 + . \ outputs 120000000000 is not very appetizing because it combines a useful concept (allowing a visual cue in number I/O) with the need to redefine many standard words. De gustibus non disputandum est. -marcel