<div dir="ltr">Tom,<div>You can include code in .h files. If you just need 200 lines of code for a utility library or class there's no need for a .c file as far as I understand. </div><div>If you divide your code in .h and .c files you can have an easier to handle structure for your programme/library, as well as be able to easily change the implementation of a given function without changing the rest of the program.</div><div>So it <i>is usually </i>avoidable in C as well, but I would argue it is desirable, especially in larger programmes. I've had applications where a single .h file was supplemented by 3-4 .c files, each containing the functions that had some common functionality. Navigating 100-300 lines at a time feels a lot less confusing than having to scroll through 1500 lines to find what you need.</div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Dec 7, 2020 at 6:50 PM Tom Wiltshire <<a href="mailto:tom@electricdruid.net">tom@electricdruid.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;">It’d be mine too if it wasn’t for the .h header files. They’re just irritating and means it usually takes two files to do the job of one file.<div><br></div><div>No other language I’ve used felt the need to have such a thing, so I don’t see why it should somehow be unavoidable in C.</div><div><br><div>
<div><br><blockquote type="cite"><div>On 7 Dec 2020, at 16:28, Michael E Caloroso <<a href="mailto:mec.forumreader@gmail.com" target="_blank">mec.forumreader@gmail.com</a>> wrote:</div><br><div><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;float:none;display:inline">C is still my favorite language.</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"></div></blockquote></div><br></div></div></div>_______________________________________________<br>
Synth-diy mailing list<br>
<a href="mailto:Synth-diy@synth-diy.org" target="_blank">Synth-diy@synth-diy.org</a><br>
<a href="http://synth-diy.org/mailman/listinfo/synth-diy" rel="noreferrer" target="_blank">http://synth-diy.org/mailman/listinfo/synth-diy</a><br>
Selling or trading? Use <a href="mailto:marketplace@synth-diy.org" target="_blank">marketplace@synth-diy.org</a><br>
</blockquote></div>