On Fri, 2005-09-30 at 07:58 +1000, [EMAIL PROTECTED] wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Thu, Sep 29, 2005 at 07:59:01PM +1000, Erik de Castro Lopo wrote: > > For just about everything you can do with a pointer in C there is > > a better, easier, less error prone way to do the same thing in > > O'caml and write less lines of code to do it. > > How about writing a network protocol stack. You get a packet and all > you know about it is that here is a block of memory. You then have > to figure out what sort of packet it is, how long it is and what > structure to give it. C handles this very nicely with pointers to > structures that can be cast into whatever you need.
Its straight forward in python and smalltalk. you have an array of octets, do what you need. What you don't have is something that can be pointed at a random memory region and used to bypass the type system and vm ;0 Rob -- GPG key available at: <http://www.robertcollins.net/keys.txt>.
signature.asc
Description: This is a digitally signed message part
-- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
