Why /prog/ hates C so much?
I can't understand you guys. C is so easy to understand and it come really together when I'm programming - really can't understand.
I just don't like when have to set the array size, it's so fucking troublesome...
>>4
Shit, clicked on reply instead of the sage field. My apologies.
>>3 is right. /prog/ has traditionally appreciated C for its simplicity (despite nonsense such as trigraphs) and efficiency. It's just the 66if it's not C or C++, it's shit99 retards who get hated on here.
>>6
Couldn't agree more. Using CPython or (pretty much any) JVM as a model for implementing GC is really just asking for trouble. To be honest, I'm not sure there even exists a GC that satisfies all of my desires.
>>10
It's not a /prog/ thing. It stands for Garbage Collector. In a nutsackshell, instead of freeing memory manually, the Garbage Collector automatically determines what memory won't be used anymore ("unreachable" memory) and frees it. Note that this approach is not mutually exclusive with Manual Memory Management, which is the traditional approach in which you manually free allocated memory. Read the wikipedia pages for more details.
Name:
Anonymous2011-09-13 23:54
>>12 Manual Memory Management, which is the traditional approach
>>13
Memory management has been around longer than GC, bro. You dumb
Name:
Anonymous2011-09-14 4:05
>>14
GC is memory management, bro. And it's an older style of memory management than C's "1-dimensional array of memory that you let an OS function pick an address from when you request an explicit amount and then you manually free it" style, which is just as much an abstraction over the hardware as GC, except it's annoying and prone to error and requires heavy use of side-effects.
>>16
Since ENTERPRAIS PROGRAMURS started shitting up the place.
Name:
Anonymous2011-09-14 6:32
>>17
Oh come on. C is a shitty language with horrible syntax and zero effort put into its design. Even more, it wouldn't be far off to say that C was probably the worst thing happened to the industry. Just look at the beasts it spawned: C++, Java, PHP... We could avoid this shit if there were no C! And it wasn't just a series of coincidental failures, all these languages were formed directly by taking the bad decisions found in C and bringing them to the next level. Give C what it deserves for its deeds: throw it into a garbage bin. If you need to work on a low-level, use Forth. For anything else there is Lisp.
Don't write in C.
Name:
Anonymous2011-09-14 6:45
>>18
Which is why almost all leading OS kernels are written in it.
>>18 Even more, it wouldn't be far off to say that C was probably the worst thing happened to the industry. Just look at the beasts it spawned: C++, Java, PHP... We could avoid this shit if there were no C!
That's due to human backwards compatibility, not C.
Name:
Anonymous2011-09-14 6:55
"C is what we call a blub language, as long as users of C is looking down the abstraction continuum, they'll think their language is superior. All they see is ASM which is slower to code in. But as soon as C programmers look up, they'll see more powerful languages like Java and Visual Basic, which has better tools like object oriented features and garbage collection. The C programmer is what the Chinese call, a frog living at the bottom of a well"
- Paul Graham, revolutionary Lisper and co-creator of Yahoo, mentor of Donald Knuth
>>21 But as soon as C programmers look up, they'll see more powerful languages like Java and Visual Basic
Visual Basic, more powerful or expressive than C? Nice joke.
Name:
Anonymous2011-09-14 7:39
>>21
>Paul Graham born 1964
>Donald Knuth born 1938
>Paul Graham is a mentor or Donald Knuth
I don't motherfucking think so, Tim.
>>15
using the malloc/free style you actually feel the cost of making such calls, whereas with GC you're just used to it being a slow fuck
face it, malloc/fee was designed to solve a particular problem (unknown size on compile time) and does it decently if not abused, GC all day everyday is just plain retarded, i'd be ok with a selective GC though
Name:
Anonymous2011-09-14 7:55
>>26
>call poster a moron
>provide no detailed evidence &| feedback
You're the moron here.
>>27
If you want to optimize, write assembly. C is not portable assembly. If it were, you wouldn't tell malloc how much memory you wanted, it would tell you how much it wanted to give you. As it is, you can't really reason any better about cache coherency with C than you can with Python -- you still have to make educated guesses at it.
and this is why I hate modern optimization. It's entirely about witch-doctor guessing and worshiping your own ignorance.
Name:
Anonymous2011-09-14 13:40
>>32
C + fixed compiler implementation = portable assembly.
>>32
True, unfortunately. You can profile, but that only gives you confidence on the system you profiled. I test on a few different systems, where at least one is really old and crappy and at least one is fairly modern, then call it a day.
Name:
Anonymous2011-09-14 17:42
I am a CS grad student and what is profiling
Name:
Anonymous2011-09-19 19:36
>>2
>c a mid level language
>superseded by python, a shit level language for homosexuals who like it up the ass
No hating on C.
I like using it for things where I need maximum efficiency and plan on micro-optimizing everything or when I need to do low-level stuff, which isn't low-level enough to also require assembly (in which case I use that as well).
What I am against is those who refuse to use anything but C, especially when they want to do high-level coding, and those that hate on high-level languages without actually understanding what they offer and what trade-offs one makes.
Disclaimer: Common Lisp, C, platform's assembly (usually x86) user here.