News for hackers. Stuff that matters.
Re:Who Says C is Simple? by astine on Wednesday July 17, 2013 @01:02PM (#6058764)
C is like the marketing slogan to Othello (reversi):

    A minute to learn, a lifetime to master.
The language is fairly simple in terms of features and aspects you have to learn to use it, but concepts like pointers and direct memory management are difficult to master. Programming in C is like building a building out of bricks; bricks are relatively simple objects, building a building out of them is not a simple task.
Re:Who Says C is Simple? by venomsnake on Wednesday July 17, 2013 @03:01PM (#6059521)
I think that pointers are hard is self fulfilling prophecy. We studied them in the 9th grade. Because nobody bothered to tell us they were hard almost my whole class - around 80% after the first two lessons groked pointers and linked lists.

Same was with pointer arithmetic and function pointers.

Right now I am struggling mightily with monads mostly because the voice in my head tells me the thing all of the internet is singing - they are hard don't bother.

Re:Who Says C is Simple? by Amadou on Wednesday July 17, 2013 @03:09PM (#6059581)
Pointers are easy when everything is working right.

It's when there are bugs in code which uses pointers that the weird can kick in and really give you a headache.

Re:Who Says C is Simple? by chebert on Thursday July 18, 2013 @12:31AM (#6061784)
Monads are easy. Do bother.

=D. Just need to be the discord to the Internet's harmony.

Re:Who Says C is Simple? by JonFish85 on Wednesday July 17, 2013 @01:07PM (#6058797)
Agree with both parents. "Simple" to me means that the code does exactly what I ask: no more, no less. For better or for worse. No behind-the-scenes magic (garbage collection, etc). I know exactly how much memory I am using, where it's allocated, and how it's passed around. Again, for better or for worse. With great power comes great responsibility!
Re:Who Says C is Simple? by pjmlp on Wednesday July 17, 2013 @02:48PM (#6059440)
Do you also know all the undefined and unspecified use cases of the standard?

http://de.slideshare.net/olvemaudal/deep-c

Re:Who Says C is Simple? by anon1385 on Wednesday July 17, 2013 @03:04PM (#6059548)
>No behind-the-scenes magic

I assume you never compile with optimisations turned on then?

Re:Who Says C is Simple? by zxcdw on Wednesday July 17, 2013 @05:53PM (#6060375)
Has very little to do with the language, apart from what undefined and platform dependent behavior allow the compiler to trick around. Of course, if the compiler goes nuts or is buggy, anything can happen "behind the scenes", but as far as I'm aware, this has nothing to do with the language as specified in the standard.
Re:Who Says C is Simple? by ctdonath on Wednesday July 17, 2013 @11:32PM (#6061629)
The problem is when what you ask for is incompatible with how it's done. Hence me today observing a price field in a record containing $9.500000000000000000002, knowing that making the obvious problem there "easy" will result in painful data manipulations elsewhere, and remembering that under certain conditions a Boolean can be neither true nor false. Asking a binary computer to handle non binary data just plain gets weird sometimes.