🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Robin Becker Thu, 23 Aug 1990 18:28
Re: case()
#456
Author: Robin Becker
Date: Thu, 23 Aug 1990 18:28
11 lines
1188 bytes
There seems to be a fundamental reason why case/switch statements
with variable/expression tags are to be avoided and that is the
impossibility of guaranteeing that a unique tag will be selected.
This means that either some ordering of tag interrogation has to
be imposed which will kill optimisations (unless all tags are constant)
or we abandon determinism and let the compiler decide.  Of course
this construct has been discussed before by Hoare,  I seem to
remember something about programs shouldn't depend on the order
of guard evaluation.  Even worse in parallel processing two guards
may get evaluated to true so parallel languages like Occam must
do something about this, but I don't know what.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads