Liste des Groupes | Revenir à cl c |
On 08.09.2024 12:18, Bart wrote:It is ridiculously over-engineered. It requires the user to have too much knowledge of its internal workings.On 08/09/2024 04:44, Janis Papanagnou wrote:Sure.On 06.09.2024 13:34, Bart wrote:>>>
(c ? a : b) = x;
In Algol 68 you can write
>
IF c THEN a ELSE b FI := x
>
or, in a shorter form, as
>
( c | a | b ) := x
>
if you prefer.
But the feature (using them in lvalue contexts) was rarely used.
Since Algol 68 is conceptually an extremely well designed language[...]>
This is only a "visual" symmetry, not a semantical one.
>
The LHS of the Algol 68 example is of 'REF' (lvalue) type, as it would
be the case with a language that supports a syntax as you show it here.
This is where I differ from Algol68,
I don't expect such formally elaborated and consistent design in
any language of much lower level.
The LHS of an an assignment needs to be an LVALUE. It has little to do with types, other than, if the LHS has type T, you might use the ability to turn it into REF T by a hypothetical application of &, to determine lvalueness.where I had to considerablyErm, no. The LHS of the assignment is a 'ref' 'int'; in "C" and in
simplify the semantics to get something I could understand and implement.
>
Take this C:
>
int A, B;
>
A = B;
>
There are two types associated with the LHS: 'int*' which is the type
the name A (its address), and 'int' which is the type of A's value.
(almost) all other languages I encountered.
- If you have an issueWhy? My decades have been partly spent devising compilers for systems languages. If my views were wrong, then they simply wouldn't work!
in seeing that, and with your decades of engagement with computers,
you may now have a serious practical effort to fix that view.
Algol68 was famous for its hard-to-grasp concepts. That's what it got wrong.This is where I think Algol68 got it badly wrong.I strongly suspect you have no clue.
Algol 68 as probably the formally mostly elaborated and consistentHere's some syntax in my language which defines 3 ranks of names:
language defines the assignment semantics not differently from any
other of the many existing languages that work with variables.
Les messages affichés proviennent d'usenet.