wiggly at wiggly.org
Fri May 11 16:08:56 BST 2007
> On Fri, May 11, 2007 at 02:04:45PM +0100, Nigel Rantor wrote:
>> Jon Nangle wrote:
>>> On Fri, May 11, 2007 at 11:49:38AM +0100, Nigel Rantor wrote:
>>>> example, why passing a char* rather than a char is likely to be
>>>> more efficient.
>>> How do you pass a char in C? Surely arrays will always decay into
>>> pointers anyway.
>> Err, by value?
> Could you give an example of the syntax that you use to pass an array "by
Yes, yes, so I forgot that giving parameters set sizes only allows for
bounds checking. Well done.
>> It was an example, perhaps I should have used C++ where you might want
>> to pass large objects by value until you realise that they're huge and
>> copying them onto the stack is a performance hit.
> Sure, except that in C, I can't think of the possible syntax you'd use for
> doing it.
Since C doesn't have objects you can't. Hence why I said "perhaps I
should have used C++" for an example instead of C.
More information about the london.pm