Bonkers

Dominic Mitchell dom at happygiraffe.net
Sat May 12 12:32:48 BST 2007


Matt S Trout wrote:
> On Fri, May 11, 2007 at 11:36:05AM -0700, chromatic wrote:
>> On Friday 11 May 2007 08:58:51 Peter Corlett wrote:
>>
>>> Sure C has objects. They're just called structs, that's all.
>> Sure C has types.  They're just the number of bits you can read or write 
>> before crashing, that's all.
> 
> Orthogonal.
> 
> You should get yourself a copy of TCP/IP Illustrated Volume 2 and look at
> how the old BSD stack used structs to provide N sets of functions pointers
> to implement the interface per network device type. Bar the lack of mutability
> of the keys it's not vastly unlike a package symbol table, at least in terms
> of -conceptualisation- of OO.

Alternative example: X toolkit intrinsics.  Don't ask me how the hell it 
works, I took one look at the description and ran away screaming.  But I 
did see that it used structs as objects in C.

-Dom


More information about the london.pm mailing list