Crazy that nobody thought to make a C-like language plus like two small improvements. Two pluses, basically. Someone should make that.
Timeline
Post
Remote status
kinda weird that in C you still have to do -lfoo to link against a system library. I thought the whole point of #include <bar/foo.h> in that style was that the <> indicate to look for it in the system path. Why can't the compiler link them for me?
Crazy that nobody thought to make a C-like language plus like two small improvements. Two pluses, basically. Someone should make that.
Crazy that nobody thought to make a C-like language plus like two small improvements. Two pluses, basically. Someone should make that.
Replies
26
@WandererUber >Crazy that nobody thought to make a C-like language plus like two small improvements. Two pluses, basically. Someone should make that
@WandererUber >Crazy that nobody thought to make a C-like language plus like two small improvements. Two pluses, basically. Someone should make that
@WandererUber g++ doesn't make you pass in linker flags at compile time?
@WandererUber
>man has not thought about system-level archetecture
>man has not thought about system-level archetecture
there's actually two others I didn't know about, C2 and C3
If I had, I would have come to the conclusion that my compiler can not have any conveniences invented later than 1874
Missed the joke?
@WandererUber probably. all i got was "haha c++ better" and nothing more
okay I can explain it to you. It was that c++ adds a bunch of garbage but doesn't even fix these things
@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.
@icst @WandererUber C tends to make a lot more sense to people when viewed as being a first abstraction over common assembly patterns. I'm becoming more firm over time in the idea that assembly should be taught before C in order to really "get" it
I like how you guys are explaining it historically as if that's a good reason for it.
The compiler should not be like this anymore is what I am saying. What ends up happening is people write half their program in make and C preprocessor, not C. That's kinda silly. And has basically nothing to do with assembly patterns.
The compiler should not be like this anymore is what I am saying. What ends up happening is people write half their program in make and C preprocessor, not C. That's kinda silly. And has basically nothing to do with assembly patterns.
@WandererUber @binkle @icst
ok cool we get rid of the preprocessor, nice libraries are whatever
technically most modern language """compilers""" are wrappers around the proper compiler than handle all of that anyway.
>What ends up happening is people write half their program in make and C preprocessor, not C.
Do you even know what youre talking about
ok cool we get rid of the preprocessor, nice libraries are whatever
technically most modern language """compilers""" are wrappers around the proper compiler than handle all of that anyway.
>What ends up happening is people write half their program in make and C preprocessor, not C.
Do you even know what youre talking about
yes
@WandererUber They did.
It's called python
It's called python
someone should make a compiler for python
@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
the one exception of course is MY language that I have yet to write which will be elegant in all cases
>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.
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 @Hyperhidrosis they already exist look up cython. The problem is python devs do not understand low level programming, so they rarely make use of it and the fact that python is dynamically typed makes it an I'll fit for for the task because it ends up janky. You would be better off with a static typed language like Go, nim, D or whatever misc others.
@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
It was a joke man, jesus
python is a ridiculous language anyways because you can't ship an executable
python is a ridiculous language anyways because you can't ship an executable
>Jai Zig Odin
I knew about those and plan to learn them, but since they deviate so much I felt like getting back into C first. They all removed headers and preproc macros btw, because it's anachronistic.
Blow is REALLY cooking with Jai, I'm pretty sure.
>oh I see I thought you were bothered by C itself not doing that
Well I mean it is what it is. But obviously everyone who knows anything is bothered by it at this point.
It was a bit of a jokey OP, but my idea was "why isn't anyone simply breaking the standard?", if you know what I mean. If gcc added any of this there would be a freakout, but if someone wrote some tooling that acted like a shim and just brute-forced it, i.e. rewrote all header imports to .c imports and stuff so that "old-style" C would compile but you could use these new conveniences in YOUR code, I think it would take off.
Especially with anyone new googling stuff about C.
"If I use this, I never have to deal with this crap again and can focus on putting buffer overflow bugs into my string functions? Great."
I knew about those and plan to learn them, but since they deviate so much I felt like getting back into C first. They all removed headers and preproc macros btw, because it's anachronistic.
Blow is REALLY cooking with Jai, I'm pretty sure.
>oh I see I thought you were bothered by C itself not doing that
Well I mean it is what it is. But obviously everyone who knows anything is bothered by it at this point.
It was a bit of a jokey OP, but my idea was "why isn't anyone simply breaking the standard?", if you know what I mean. If gcc added any of this there would be a freakout, but if someone wrote some tooling that acted like a shim and just brute-forced it, i.e. rewrote all header imports to .c imports and stuff so that "old-style" C would compile but you could use these new conveniences in YOUR code, I think it would take off.
Especially with anyone new googling stuff about C.
"If I use this, I never have to deal with this crap again and can focus on putting buffer overflow bugs into my string functions? Great."
@binkle @WandererUber I remember Sterence talking about having tried Zig and Odin because he couldn't stand the build setup annoyance of C but had lots of different problems with each and eventually settled on using D for his projects.
who is that again?
You mis-spelled Go