I never use CRT routines in production code because: 1) Less efficient, 2) Possible additional bugs in the CRT layer, 3) Less control over ops than native, and 4) Even when a bug is my fault, it is harder to find with the extra CRT layer of crap on top.https://twitter.com/Jonathan_Blow/status/1417544504916135936 …
-
-
They are told that, and then just repeat the meme. Remember that, as a proportion, actual native language programmers are a small fraction of programmers. And even then most of those don't look inside libc.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Mh, I wonder, I had that mistaken impression due to how it was used, like for example languages like PHP basing their runtime on the C runtime. Implicit learning from the subtext, many developers seemed to treat it that way so I never questioned it.
-
At best the CRT is antiquated. Its API only makes sense if you are programming a long, long time ago :)
- Show replies
New conversation -
-
-
I have never seen software NOT using the C runtime library. I thought that you cannot ship a program without it. For example, I thought malloc is the only way to allocate memory, and every program has to call it (calloc and new call it too, right?)
-
malloc does not map memory. It is just a sub-allocator that sits on top of the OS's memory map, which you can instead just call directly. You call VirtualAlloc on Windows or mmap on Linux. For example, in the refterm stuff I just posted:https://github.com/cmuratori/refterm/blob/91e932f011e12c02a6c609ac59570f5c19fe4727/refterm_example_terminal.c#L6 …
- Show replies
New conversation -
-
-
In school and work, all the guys told me CRT & STL all standard stuff is easy to use. Actually I try to read the STL code that I can see .It’s gaint mess. Nobody try to get out of it. They thought it’s hard. Honestly, I hasn’t try to do it as well. So sad on myself. I wil try it
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
People forget or don't know the history of C as a high level language, and rather think of it as some kind of low level machine language the machine understands directly. Instead of understanding libc as a high level abstraction, people think of it as an interface to the silicon.
-
As languages get increasingly unconcerned with machine specifics, C becomes more and more "low level" by comparison, I suppose.
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.