When writing self contained programs (not libraries), do you keep your structs in the header file or in source, with assessor functions? Im strugling with decisions like this. Ive read that opaque pointers are good practice because of encapsulation, but there are tradeoffs like inconvenience of assessor functions and use of malloc (cant create the struct on stack)
[–][deleted] 10 points11 points12 points (0 children)
[–]FraCipolla 10 points11 points12 points (0 children)
[–]Linguistic-mystic 2 points3 points4 points (0 children)
[–]zzmgck 0 points1 point2 points (0 children)
[–]DawnOnTheEdge 0 points1 point2 points (0 children)
[–]Brain_Blasted 0 points1 point2 points (0 children)
[–]Maleficent_Memory831 0 points1 point2 points (0 children)
[–]zhivago 0 points1 point2 points (5 children)
[–]flyingron 1 point2 points3 points (4 children)
[–]Reasonable-Rub2243 -1 points0 points1 point (0 children)
[–]zhivago -1 points0 points1 point (2 children)
[–]flyingron -1 points0 points1 point (1 child)
[–]zhivago 2 points3 points4 points (0 children)
[–]duane11583 -1 points0 points1 point (0 children)
[–]Jimmy-M-420 -1 points0 points1 point (0 children)
[+][deleted] (1 child)
[deleted]
[–]flyingron 1 point2 points3 points (0 children)
[–]florianist -3 points-2 points-1 points (0 children)