Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Object-oriented access bottleneck
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Nuutti Kotivuori <naked+caml@n...>
Subject: Re: [Caml-list] Object-oriented access bottleneck
Nicolas Cannasse wrote:
> [...]
>> So - I am asking if I'm correct in my deductions here, or if I
>> missed some important point. Or if there's an alternative way to
>> circumvent this restriction.
>> To summarize - is there any way to have some function (or method or
>> whatever) that is able to access object member data, without the
>> overhead of a lazy binding function call? Preferably ofcourse such
>> a function should be eligible to be inlined.
>> Thanks in advance,
>> -- Naked
> There is good way : don't use objects :-) For most of the cases,
> modules should be powerful enough and offer far better
> performances... and inlining.  Even if you need some specialisation,
> you can always handle it using a closure.

Yes, obviously :-) But when I do happen to need specialisation, I add
closures as variables in a record or something - and soon I'll be
adding several of them in a single one, then getting bothered that
they take up so much space in the object, then come up with having
special closure-only records that are shared between different records
and... well, as you can see, this only leads to reimplementing the
entire object model myself :-)

-- Naked

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: