![]() |
Re: Why I hate c
What do you mean by "single equality sign in a conditional"? Isn't = an assignment symbol?
|
Re: Why I hate c
Your inability to detect problems is in all likelyhood related to the self rather than the language. Personally, if I can't solve a C/C++ bug within 5-10 minutes, I ask someone who also knows it to look over the language, because they find things I miss. And good compilers do make a good deal of difference. Personally, I like C++ because I like object-oriented language, but C is better than visual whatever they were using before. You can do so much more with so much less. Plus, knowing it has broader practical applications.
|
Re: Why I hate c
There's a way around that (sort of): Something I call "psuedo-objects". Basically, For each instance of the object, Copy the code and declarations and rename. And replace dots with underscores. Object_Procedure
|
Re: Why I hate c
Quote:
|
Re: Why I hate c
I know that, but generally isn't "If (foo=42)" what one tries to avoid?
|
Re: Why I hate c
Quote:
The reason C compilers don't typically give warnings or errors for using the single equals sign inside a conditional is because it CAN be valid. In the code I posted, the single equals sign sets the address of a file handle, whose value needs to be inequal to zero in order to work. Yes, it's one of those annoying tricks used by programmers who like being clever (i.e. me), but my point is that it's valid and there's no reason the compiler should label it as a syntax error. |
Re: Why I hate c
Some compilers will give you a warning if a condition will always be true or always be false.
|
Re: Why I hate c
Off topic... but I gotta say...
Alan, you made a great program. While you were at work yesterday, we started making automodes. Your software system enabled us to create 5 workable automodes within about 6 hours. These are 5 modes that work, at least on our field. The code was so clear that even I could tweak the numbers. To the rest of you, get this: Alan was just an interested parent who attended meetings a few months ago. We needed some more talent in the software area and he rode in on his white horse and saved the day. Thanks Alan!! Welcome to the craziness of FIRST! Andy B. |
Re: Why I hate c
I'm proud of Andy for working on the auto modes :)
|
Re: Why I hate c
Quote:
That is... of the dark side of the force... forever will it dominate your destiny. Baker is now tainted goods.... Remember kids: Do not fall to the Spark Side. ;) Gearboxes are more fun. John |
Re: Why I hate c
Quote:
Sooner or later you will learn that you can't resist the natrual urge to become one of us. We have Baker now, and you're next! *evil laugh* Seriously, isn't C much nicer because now you Gearheads no longer have an excuse about not understanding the basic operations of the language? Steve |
Re: Why I hate c
Quote:
|
Re: Why I hate c
Quote:
|
Re: Why I hate c
Not to mention PCs, which may have a bigger market than embedded systems; C++ is the standard there, too (Though VB is good for a quick dev, I made a program in 10 minutes in VB).
|
Re: Why I hate c
Quote:
|
| All times are GMT -5. The time now is 00:14. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi