Exit y/n coding

Pages: 12
@Zaita
Yes you're right, but the same principle applies and goto is regarded the same way by the 'C' community. The only technique discussed in this thread not applicable to C are exceptions and as you have pointed out using them to control normal flow is not good practice.
[edit] @Zaita
Mostly. The use of goto in Linux has more to do with Torvalds. When designing the kernel he noticed that many times his efforts to avoid using goto caused him to spend more time and effort on a larger piece of code than it could have been. So he said, "what's wrong with using goto?" and used it to make code smaller and easier to understand --something he has had to repeat [say] on numerous occasions.
Last edited on
@bnbertha, @Duoas: My asking that question was around the idea that C++ should be coded in an OO style, therefore it's alot easier to extract code out to a new function of a class than it would be to do so in C because of the prototyping etc. It just seems easier to re-factor OO code than Non-OO code.

But then C++ is really optional code. I am like compulsive OO developer :P
@Zaita
I know we're getting a bit off topic here but refactoring is one of my pet subjects so I can't let this opportunity pass :D

You've got me thinking as I've never really considered the C Vs C++ or Functional Vs OO refactoring issue before. I think it is more dependent on how well the code has been written rather than the design methodology, well written C is quite modular. As the scale of the refactoring got bigger, the design methodology would become more of an issue. I could go on but I suspect your eyelids are getting heavy already :)

LOL

We've been off topic for a while now... :-]

That's one of the strengths/weaknesses of C++: it does everything --and scares the snot out of even experienced programmers for it.

C++ really is an OO language, but it can be used procedurally in order to support C. That was a very conscious decision by Stroustrup, but I think he would have preferred to dump C from the beginning...

I like C++'s functional capabilities. :->
This thread had a topic? :P

I am a very OO person. The only procedural part of my application is the int main or winmain() functions :P Everything from there is done in 100% OO; this is why my answers will often reflect an OO pov and not take into consideration a procedural pov.

I consider procedural to be C, while OO C++. Pet habit I guess.

I would find it easier to add a new function into an OO project than non-OO. Simply because OO by it's nature defines a place for the prototype and the code based on the persons design. With non-OO code this can become a little bit ambiguous, especially in multi-developer projects.
How did we get from someone having a problem with y/n coding to talking about object oriented programming?

closed account (z05DSL3A)
One post at a time. :0)

All the best threads unravel to reveal somthing else.
Topic archived. No new replies allowed.
Pages: 12