Linked by MOS6510 on Thu 10th Jan 2013 23:25 UTC
General Development "For years I've tried my damnedest to get away from C. Too simple, too many details to manage, too old and crufty, too low level. I've had intense and torrid love affairs with Java, C++, and Erlang. I've built things I'm proud of with all of them, and yet each has broken my heart. They've made promises they couldn't keep, created cultures that focus on the wrong things, and made devastating tradeoffs that eventually make you suffer painfully. And I keep crawling back to C."
Thread beginning with comment 548346
To view parent comment, click here.
To read all comments associated with this story, please click here.
moondevil
Member since:
2005-07-08

Unlike the other common programming languages of our days, C is the only one expressive enough to do everything you want to do with the machine.


Really?!

And I though Ada, Modula-2, Modula-3 and Turbo/Free Pascal, Oberon(-2) already provided everything C does and more, just to name a few comparable languages.

Not type checking adds to the expressiveness of C, it doesn't make it "unsafe" if you know what you are doing. That you can copy things elsewhere without being stopped is a very useful side feature, especially in system code.


Security exploits everywhere, since not everyone is a top developer.

Also, C strings are not necessarily too tied to the language. You could modify a C compiler in order to output Pascal-style strings for string constants, and you could make custom string functions that handled Pascal strings if you really wanted to..


Then you throw C performance out of the window, because all C libraries assume null terminated strings and you end up converting between string types all the time.

Edited 2013-01-11 10:30 UTC

Reply Parent Score: 4

Tractor Member since:
2006-08-18

Then you throw C performance out of the window, because all C libraries assume null terminated strings and you end up converting between string types all the time.


Since when is C performance depending on null-terminated string ? God, have you already programmed in C ?

Whenever i'm looking for performance, i never handle strings, but blocks of bytes.
Strings are for "higher-layers", such as sending a file name as a parameter. This kind of usage has zero impact on critical loop performance.

Reply Parent Score: 1

moondevil Member since:
2005-07-08

Since when is C performance depending on null-terminated string ?


The performance lost is the string conversion.

As long as you keep using the same type of strings, there is no issue.

God, have you already programmed in C ?


1992 - 2001

Reply Parent Score: 2