Egregoros

Signal feed

Timeline

Post

Remote status

Context

8
@WandererUber everything is manual in C. Headers traditionally only include function prototypes and data type definitions. You can define full functions in a header only if you declare a function with the keywords "static inline" and that is actually a nonstandard extension that is just widely supported. If you declare a function in a header without it you will have link errors if you include it from more than one C file.
@WandererUber @icst I guess it depends what you mean by a "good" reason - it was a good reason at the time of C's creation, because those were the problems we were setting out to solve at the time. That it doesn't always solve modern problems in an elegant way shouldn't be surprising, as no language is future-proofed in perfect elegance and is always solving some set of problems elegantly at the expense of others being less so

the one exception of course is MY language that I have yet to write which will be elegant in all cases :frothvibrate:
>That it doesn't always solve modern problems in an elegant way shouldn't be surprising
That's not what was the "surprising" aspect of my post. The fact nobody was able to fix this once computers had more than 2 megabytes of RAM is what's "surprising"

There's no way they could have known what sorts of hellspawn abominations would come out of their "conveniences" from back then and now that people know, they don't want to do it the C way anymore.
Other languages of course have their own versions of dependency hell, but C's is particularly antiquated. Headers are annoying and everyone agrees basically.
@WandererUber @icst oh I see I thought you were bothered by C itself not doing that. Yeah I think a big part of it is a psychological thing on the part of language designers - they want to do something "BIG" not just a few changes. I joke about JBlow a lot but I do think the way Jai started out was exactly what you want. These days it still has those improvements but it also has a lot of metaprogramming conveniences that are the "BIG" thing. I think Zig and Odin might also scratch a similar itch but I haven't looked much into them

Replies

0

Fetching replies…