[OT] Dennis Ritchie's proposal for slices in C
Paulo Pinto
pjmlp at progtools.org
Tue Dec 10 10:05:36 UTC 2024
On Monday, 9 December 2024 at 14:29:08 UTC, Derek Fawcus wrote:
> On Monday, 9 December 2024 at 10:22:19 UTC, Paulo Pinto wrote:
>> Yes, and this kind of makes the point WG14 has no interest
>> fixing the issue, when not even one of the language authors
>> can change their mind.
>>
>> Note that the languages they designed afterwards, Alef, Limbo
>> and Go, don't have this issue.
>
> Alef was by Phil Winterbottom, not Richie. Richie probably had
> a hand in Limbo (since he wrote the reference manual), but
> likely not in Go.
>
> While Alef did have a form of fat pointer (polymophic type /
> pointer), that seems to have been more akin to "interface{}" /
> aka "any" in Go, in that it carried type information, not
> bounds. I'm guessing that also got used when a Channel was able
> to carry one of a set of types (as opposed to chan of
> tuple-type).
>
> As far as I can tell from the reference manual, Alef had
> identical array to pointer decomposition as in C.
Alef allowed for tuples, so for the short time it lived on Plan
9, it was possible to at least make use of tuples to easily pass
pointer + length as a single unit around.
One can argue that this is also possible with structs, but for
whatever psicological reason one is favoured over the other,
although the purpose is kind of similar.
C and UNIX had two key designers, Ken Thompson is one of the
three original contributors to Go, not Dennis.
Alongside Rob Pike, one of the key figures in Alef and Limbo
design.
More information about the Digitalmars-d
mailing list