News for hackers. Stuff that matters.
Re:The Sad State of C Strings by int0x80 on Wednesday February 10, 2016 @04:28AM (#11071595)
IMO it is usefull to have the "return result paradigm". You can do things like: bar(foo(x, y)) and chain function results. Notice how this applies to strcpy:

  char *heap_ptr, *stack_ptr; ...    fn_needs_heap_ptr(strcpy(heap_ptr, stack_ptr));
Another example (dma address space != buf a.s):

  char *dma_ptr, *buf; ... fn_needs_dma_ptr(strcpy(dma_ptr, buf)) ...
IOW, foo(strcpy(dst, src)) is VERY different than strcpy(dst, src); foo(src);

There are no comments on this comment yet.