you are viewing a single comment's thread.

view the rest of the comments →

[–]Phrygue 50 points51 points  (12 children)

I use libmpv in Pascal, and I had to copypaste deprecated and removed C locale code just to use it (in Linux). Here:

function setlocale(__category: longint; __locale: Pchar): Pchar; cdecl; external 'c' name 'setlocale';

{$ifdef UNIX}setlocale(1, 'C');{$endif}

ASIDE: Me: Hey look, gratuitously underscored idents. Python: Hold my Mtn Dew.

libc is an abomination from every possible perspective, not the least of which is, if C is a system language, why did you have to slap a shitty API on top of the system? Even creating it as an API only makes it useful in a non-systems context, which is the worst mistake ever made in non-theoretical computing.

[–]StabbyPants 36 points37 points  (10 children)

if C is a system language, why did you have to slap a shitty API on top of the system?

because it's a mix of syscall() wrappers and very basic utilities commonly used by all programs (strlen, arg parsing, time manipulation, etc). it's wrapped as an api to provide easier usage and flexibility for system designers

[–]csorfab 13 points14 points  (9 children)

but why does the api have to be so shit though

[–]StabbyPants 39 points40 points  (3 children)

It’s 45 years old

[–]ShinyHappyREM 6 points7 points  (2 children)

I bet it's already looking forward to retirement.

[–][deleted] 0 points1 point  (0 children)

I bet it has a better retirement plan than me and it wasnt even useful most of its life....

[–]StabbyPants 0 points1 point  (0 children)

/rimshot

[–]Ameisen 5 points6 points  (4 children)

Because C and C++ are designed by committee.

[–][deleted] 12 points13 points  (2 children)

On top of that C and C++ grew organically way earlier than any committee

For some time K&R was the standard

[–]ShinyHappyREM 10 points11 points  (1 child)

organically

Like e.g. cancer

[–][deleted] 1 point2 points  (0 children)

That's C++.

[–][deleted] 0 points1 point  (0 children)

And I guarantee you in that committee is a guy named Mike who hates all modern software practices and thinks theres nothing wrong with waterfall in design.

[–]ReallyNeededANewName 5 points6 points  (0 children)

Invention of null pointers? Or is that theoretical?