Hi
A nonsense question !
Why I hate C!! The problem is with me or C?
Please, just one way to get me out of this hatred this Monday.
Split and moved to General programming.. - Moderator
Hi
A nonsense question !
Why I hate C!! The problem is with me or C?
Please, just one way to get me out of this hatred this Monday.
Split and moved to General programming.. - Moderator
The problem is with me or C?
Probably you.
Did you learn your A and B to get to C?
A = ASSEMBLER
B = Bytes
C
Jim
Just wait for 'Simonetta' to find this.. (-:
I love C. And I like Mondays. They are the same as every other day since I retired.
Better you practice your C, and you will love it when it flows easily. In the mean time, you can hate me.
Guess: Maybe you "hate" C because it does what you TELL it to do, instead of doing what you WANT it to do? The BIG TRICK? Learning how to tell it what you want it to do!
Jim
B = Bytes
You mean BASIC? That comes after Assembler..... then C or not.....
B = Bytes
You mean BASIC? That comes after Assembler..... then C or not.....
I was stuck for something witty and failed....
Jim
Guess: Maybe you "hate" C because it does what you TELL it to do, instead of doing what you WANT it to do? The BIG TRICK? Learning how to tell it what you want it to do!
Jim
I was going to say something about getting married for that, but I never have been, so I should shut up already.
''D' is for 'defenestration' when you throw the whole thing out the window and take up golf instead.
S.
Thanks for your guidance
The result is:
Hey ugly C, I must learn you so the world is full of unreasonable things that I have to deal with. I hope, one day I will love you.
"I was stuck for something witty and failed...."
And yet...
Well....
C is a LOT better than working in assembly, but there are some simple compiler features that it lacks which could make things lots smoother. If you point any of these out, you get long responses about the "spirit of C" and shouted down in embedded programming forums. Don't ask me how I know
GCC is maintained by some really clever people and it optimizes better than I could write any assembly code. But then, it doesn't have to worry about the assembly code it generates being legible since anybody in his right mind does his maintenance work in the C source, not the assembly output.
P.S. I speak C with a strong Pascal accent.
And some folks went for the "D" programming language (incl at least one C++ "elephant") : https://dlang.org
I'm going to pass on this. After all, what you C is what you get. Monkey C: monkey do.
C is a LOT better than working in assembly, but there are some simple compiler features that it lacks which could make things lots smoother.
If you point any of these out, you get long responses about the "spirit of C" ...
Theoretical vs practical.
Way back when, I read an article about whether Pascal's case statement needs an else clause.
Niklaus Wirth, who created Pascal, argued that the case statement should not have an else.
Many Pascal compilers, including Turbo Pascal, included an else for the case statement because it was too practical to leave out.
(Note that C has default for the switch statement.)
So Torby, which "simple compiler features" does C lack?
var parameters, for one. In pascal languages, you specify VAR in the parameters and whenever you call the function, it knows to pass by reference. In C you have to remember that yourself. Some other little bits and pieces.
ELSE made the pascal case statement SO much more useful.
I like how C variables are executable code and you can say int B = PORTB & (1<<c) ;
Hey ... C, I must learn you
Yes, that is the key!
You must make the effort to properly, systematically, learn the language - not just jump in and hope to throw stuff together.
Here's some learning & reference materials for you: http://blog.antronics.co.uk/2011/08/08/so-youre-thinking-of-starting-with-c/
It's always the same when going from one language to another: because you naturally just try to write, eg, BASIC in C - which is doomed to failure and frustration.
It will get better once you can actually start to think in C (or whatever)...
Speaking two languages, I have to start thinking in one of them before I can speak it. Same with programming. I've used many languages over the years. Think it, then you can speak it.