it's the resources, stupid

1 view
Skip to first unread message

Raoul Duke

unread,
Jan 12, 2022, 5:40:56 PM1/12/22
to pi...@googlegroups.com
i know things like C and Obj-C aren't very ergonomic vis a vie memory ... but it kills me how people write libs in those languages and actively avoid documenting let alone better designing their apis around that issue. 

Kyle Hayes

unread,
Jan 12, 2022, 7:38:35 PM1/12/22
to pi...@googlegroups.com
A big problem in those languages is that memory management is an ambient "feature".   So you need to conform to however memory is handled within the library.   Generally in C or C++ you tend to see ownership purely outside the library or purely inside the library.  

1000% agree about the documentation!

Best,
Kyle

On Wed, Jan 12, 2022 at 2:40 PM Raoul Duke <rao...@gmail.com> wrote:
i know things like C and Obj-C aren't very ergonomic vis a vie memory ... but it kills me how people write libs in those languages and actively avoid documenting let alone better designing their apis around that issue. 

--
You received this message because you are subscribed to the Google Groups "PiLuD" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pilud+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pilud/CAJ7XQb5bJX8Q9KBzmpkA7EesqMfu12rNViqVOU_aw5C7qwbiew%40mail.gmail.com.

Raoul Duke

unread,
Jan 13, 2022, 1:09:49 AM1/13/22
to pi...@googlegroups.com
it is layers of badness all the way down. 

like when apis don't do anything much to help you get order of operations right. so you futz around reordering lines of code, doing generate & test, hoping that somehow eventually you'll stop getting errors and failures. 

let alone documentation hardy har har. 

or help you also know how to clean up right. there should be a helper class which is a mini memory manager for the api that gives you a single free() call and it knows how to clean up all the bits and pieces orderly & properly. 
Reply all
Reply to author
Forward
0 new messages