[TUHS] The evolution of Unix facilities and architecture

Michael Kjörling michael at kjorling.se
Fri May 12 03:11:00 AEST 2017


On 11 May 2017 12:17 -0400, from clemc at ccc.com (Clem Cole):
> On Thu, May 11, 2017 at 10:21 AM, Larry McVoy <lm at mcvoy.com> wrote:
>> Is this style of declarations common?
>> 
>> char
>>         *bbit,
>>         *abbit,
>>         *state,
>>         *lc,
>>         pathname[200],
>> /.../
> 
> Ted certainly did that a lot.
> (It drove me nuts.   I hated it and argued a bit about it.)  One of the
> reasons I hated C when I first learned it.

On the flip side, it certainly does beat `char* x, y, z[100];` or
`FILE* fpsrc, fpdst;`. I wonder how many aspiring C programmers have
been tripped up by constructs like those? It's perfectly reasonable
_once you know about it_, but if you don't, then, well...

It's even more fun if your system doesn't have memory protection. No,
I'm not speaking from experience; what made you think that I did? ;-)

-- 
Michael Kjörling • https://michael.kjorling.semichael at kjorling.se
                 “People who think they know everything really annoy
                 those of us who know we don’t.” (Bjarne Stroustrup)


More information about the TUHS mailing list