It also has a few downsides: - The build system is broken. vs. make. qmake. cmake. autotools. scons. 'modern' makefiles (>_> what does that even mean? Yes, I'm looking at you Google) There's a whole ecosystem of tools out there to solve this. - There are a few rubbish IDEs, most of which support c as a second class candidate. VS has officially abandoned C; xcode grudgingly supports it. The CDT is mediocre. There's li…
> It's a tool for some jobs; definitely not all. I'd completely agree. I would not use C for doing any web platform work (writing a REST service as you say). I may write a webserver in C if I had tight memory constraints. Where I see C still being very useful: embedded applications, drivers, and latency sensitive code. When you are trying to push the most I/O possible through a network interface or disk interface, C…
The Unreasonable Effectiveness of C
221–230 of 394 posts
Re: The Unreasonable Effectiveness of C
#222Earlier quoted context omitted.
> a barely functional string type There's a string type in C? All I see are character arrays and a few (poorly thought out) conventions for using them.
http://en.wikipedia.org/wiki/Null-terminated_string
Re: The Unreasonable Effectiveness of C
#223To nitpick on a single statement: > C has the fastest development interactivity of any mainstream statically typed language. What? Despite all its shortcomings, Java in a modern IDE effectively has zero build time. The level of interactivity is as fast as that of interpreted languages. I haven't seen anyone manage this with C yet.
I'd rather have a Repl than a "modern IDE". C does not have or need a Repl because it's not designed for giant single programs anyway. Unix is the C Repl.
Re: The Unreasonable Effectiveness of C
#224Earlier quoted context omitted.
It may be less confusing to say "C's underlying model of computation".
What's so confusing about the term virtual machine? It's an abstraction of the underlying machine.
That is, the phrase "virtual machine" is usually assumed to be the name for a piece of software that pretends to be some particular hardware. It is less commonly used to mean a "virtual machine", that is, not a noun unto itself, but the adjective virtual followed by the noun machine.
Re: The Unreasonable Effectiveness of C
#225Earlier quoted context omitted.
By the way, I refactor C with regexps and text utils. In UNIX a pretty complicated refactoring can be done with a shell oneliner. This method actually rules. C allows that because it does not have namespaces. C is minimalistic so that it allows working with it with minimalistic tools rather comfortably.
Really?! Have you ever looked at what InteliJ allows as refactoring tools?
Re: The Unreasonable Effectiveness of C
#226Earlier quoted context omitted.
Foul depths of hell? I've never programmed in C or C++, but this seems to me to be a map from strings to vectors of strings. Reads easily. I don't like the :: namespace separator, but what can you do...
but what can you do... using namespace std; map > foo;
Re: The Unreasonable Effectiveness of C
#227C is a fantastic high level language. Nonsense. This sudden C fad is totally baffling to me. C is a great language for low-level work and it does have an attractive minimal elegance but is in absolutely no sense of the term a high level language . A language with next to no standard containers or algorithms, manual memory management, raw pointers, a barely functional string type and minimal standard library and concu…
Re: The Unreasonable Effectiveness of C
#228Arguably, one of the most beautiful C-code bases you can get hold off.
Re: The Unreasonable Effectiveness of C
#229Re: The Unreasonable Effectiveness of C
#230Earlier quoted context omitted.
> Madhadron, you make a lot of claims but provide no detail. Also using terms like "virtual machine" with respect to C is plainly ridiculous and a case of bullshit baffles brains. C as a very thin virtual machine is a common conception and not an incorrect one--C runs on many systems with noncontiguous memory segments but presents it as a single contiguous space, for example. The idea of C as a virtual machine is muc…
C as a very thin virtual machine is a common conception and not an incorrect one--C runs on many systems with noncontiguous memory segments but presents it as a single contiguous space, for example. C does no such thing. That is the job of the MMU, and C has nothing to say about it. You're going to have a hard time convincing anyone that a language without a runtime somehow has a VM. That's nonsense.