🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.arch
Article #224

Re: Documentation (was Re: Performance of xchg reg,reg)

#224
From: George Neuner
Date: Mon, 19 Oct 2026 18:50
73 lines
4102 bytes
On Mon, 19 Oct 2026 01:52:51 -0000 (UTC),
cross@spitfire.i.gajendra.net (Dan Cross) wrote:

>In article <6ad5609b.8505984@news.eternal-september.org>,
>John Savard <quadibloc@invalid.com> wrote:
>>On Sun, 18 Oct 2026 09:45:00 -0400, George Neuner
>><gneuner2@comcast.net> wrote:
>>
>>>The problem with the original report was that they attempted with the
>>>grammar turn [at least some kinds of] semantic errors into syntax
>>>errors.
>>
>>Obviously, there's no way one can enable a compiler to flag logic
>>errors in programs. A Turing-complete language can calculate anything,
>>so how can it tell you that you were calculating this when you wanted
>>to calculate that?
>
>With apologies, arguments like these always seem to me to miss
>the forest for the trees a bit.  Some constructs clearly violate
>the documented semantics of e.g. a language.
>
>Yes, these langauges are all Turing-complete and so on, and no,
>we cannot solve _The_ Halting Problem, in all of its glorious
>generality.  But, we can solve any number of specific halting
>_problems_.  For example, I can see that, `for (;;);` is a loop
>that does not terminate.  With enough effort, I can take that
>down some reasonably long paths.
>
>So, too, one can spot a lot of logic errors.  There's no reason
>a compiler can't see this, for example:
>
>?	if (ptr == NULL) {
>?		int v = *ptr++;
>?		*ptr = v + 10;
>?	}
>
>And flag it with a error: "you dereferenced a pointer right
>after you asserted it was nil; did you invert the condition?"


Absolutely compiler analysis can catch (some) semantic errors ... that
never was in question.  


The problem with the *original* Algol68 report was that they tried to
encode semantics using the syntax, the idea being that the parser then
could catch semantic errors as syntax errors.

The revised report changed direction: the syntax no longer tried to
encode the semantics ... but it still was hard to read because the
syntax definitions made copious /reference/ to semantics discussed in
accompanying text.


>Similarly, I posted about Rust a few days ago, which can do all
>sorts of fun stuff with its borrow checker to assert that an
>object is still alive while references to it exist, and so on,
>and reject programs at compilation time that violate those
>semantics.
>
>>Of course, with AI, we might be able to do something there.
>>
>>But already many modern languages do have strict type-checking.
>>
>>So even if Algol 68 was over-ambitious in this regard, trying to have
>>the language help the programmer avoid more mistakes is basically a
>>sound idea.
>
>Agreed.  Indeed, we've gone much farther than just mere type
>checking.
>
>	- Dan C.
>	
Technical Details
Message-ID: <7tocdllvftsndin92d9q2kjf90if8dha8p@4ax.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
References: <2026Oct13.104347@mips.complang.tuwien.ac.at> <11b0nak$iems$9@dont-email.me> <kqg9dl5oj9l0dih5kvnrif2fv91ns8lgs3@4ax.com> <6ad5609b.8505984@news.eternal-september.org> <11b3t5j$h7l$1@reader2.panix.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: George Neuner <gneuner2@comcast.net>
Newsgroups: comp.arch
Subject: Re: Documentation (was Re: Performance of xchg reg,reg)
Date: Mon, 19 Oct 2026 14:50:57 -0400
Organization: A noiseless patient Spider
Lines: 73
Message-ID: <7tocdllvftsndin92d9q2kjf90if8dha8p@4ax.com>
References: <2026Oct13.104347@mips.complang.tuwien.ac.at> <11b0nak$iems$9@dont-email.me> <kqg9dl5oj9l0dih5kvnrif2fv91ns8lgs3@4ax.com> <6ad5609b.8505984@news.eternal-september.org> <11b3t5j$h7l$1@reader2.panix.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 19 Oct 2026 18:51:00 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="2463550"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1+ADmP9Fpaj4kKoPYYu46VIPBZJpaaZ3ks="; posting-host="ead98d7ad94e8cdec934ad7faf926a0c"
User-Agent: ForteAgent/8.00.32.1272
Cancel-Lock: sha1:C6J6Dffosmw3hcS6S8vIzafUXsM= sha256:5iIrouHoZSLjN1k5X02HlYGCVgmdqHzOMyaeQb1NGFw=
	sha1:qFoxKzL7DKs5SQpVe6mxulP3sYk= sha256:QMYWPfEu0xcgOmzwJk8smjXrMySubxu8ydNIwmtiV7M=