[go: up one dir, main page]

|
|
Log in / Subscribe / Register

Missed opportunities

Missed opportunities

Posted Jun 11, 2013 15:17 UTC (Tue) by viro (subscriber, #7872)
In reply to: Missed opportunities by tjc
Parent article: Little things that matter in language design

<sarcasm> yes, because A68 is such a stellar success... </sarcasm>

The trouble with that approach is the shitload of hard to spot bugs happening when the programmer's idea of how the expression will be interpreted is different from what the Revised Report says (not to mention the places where compiler's idea of how it should be interpreted differs from either). And the rules are appallingly convoluted, exactly because it tries hard to DWIM. With usual nastiness following from that..

C is actually on a sweetspot between A68-level opaque attempt at DWIM (6 kinds of contexts, etc.) and things like BLISS where you have to spell *all* dereferences out - i = j + 1 is spelled i = .j + 1 (and yes, they went and used . for dereference operator, leading to no end of joy when trying to RTFS, especially when it's a lineprinter-produced listing).


to post comments

Missed opportunities

Posted Jun 11, 2013 17:38 UTC (Tue) by tjc (guest, #137) [Link]

I'm not an expert on Algol 68 (Adriaan van Wijngaarden was probably the first, one of few, and last), but I think implicit indirection only worked in the language because it restricted the things you could do with pointers. Something like *p-- in C, for example — I don't know how that could be expressed without an explicit indirection operator.


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds