Page 3 of 3 FirstFirst 123
Results 21 to 26 of 26
  1. #21
    Join Date
    Feb 2004
    Location
    Wildomar CA
    Posts
    970
    I find myself using goto's sometimes, doesn't make the code harder to read to me.

    Living forever is a scientific possibility! Immortality, eternal youth or life extension is within reach! Check out the website at The Mprize

  2. #22
    Join Date
    Jun 2003
    Location
    Central California, US
    Posts
    69
    On the subject of using Goto in C++ my instructors are unanimous, don't do it.

    My basic C++ instructor worked as a supervisor in a large dev house. He pointed out that if you use it in a team environment your co-workers will HATE you and brand you a hacker LOL. Generally they wont dig into your source but it frequently needs to be done so KISS. Secondly and most importantly the client who is buying your software will certainly verify your code and things like dead code and gotos will make for a potential loss of contract.

    In my data structures course our instructor specified in his syllabus that if we used gotos anywhere in C++ code he'd auto-fail the assignment He was trying to drive home that they have no place in modern OOP schemes. OOP by nature lends itself to easy readibility and gotos can only counteract that.

    This was the hardest thing for me to get over as I have been programming since I was 10 and I started on BASIC. I strive to make my code as readable as possibe if for no one else but myself as I have a terrible memory. Honestly I still got a little place in my heart for tha goto statement but using it even a little is like 'kinda' being a smoker

    Just dont do it at all.
    Last edited by Astinus; 04-02-2005 at 10:10 PM.
    3DBuzz <-- now even better than porn!

  3. #23
    Join Date
    Oct 2003
    Location
    My little corner of the world
    Posts
    1,460
    Quote Originally Posted by NanoWarrior
    I find myself using goto's sometimes, doesn't make the code harder to read to me.
    thats the point
    it doesn't make it harder to you, because you know what they are doing
    if you showed the code for another person they wouldn't understand a thing (not to mention yourself after you spend some time without looking at the code and then getting back to maintain it)
    "Things are like they are because thats how they are suposed to be"

  4. #24
    Join Date
    Feb 2004
    Location
    Wildomar CA
    Posts
    970
    Quote Originally Posted by KhaoticMind
    thats the point
    it doesn't make it harder to you, because you know what they are doing
    if you showed the code for another person they wouldn't understand a thing (not to mention yourself after you spend some time without looking at the code and then getting back to maintain it)
    \


    Im not too sure on about that one in the case of me coming back and not understanding it, but we'll see .

    Living forever is a scientific possibility! Immortality, eternal youth or life extension is within reach! Check out the website at The Mprize

  5. #25
    Join Date
    Dec 2002
    Posts
    73
    Quote Originally Posted by NanoWarrior
    \


    Im not too sure on about that one in the case of me coming back and not understanding it, but we'll see .
    I've found it depends on the complexity of the algorithms, the quality of the commenting and the elapsed time. Stuff that I've come back to after 6 months that was tough in in the first place is even tougher, that's without spaghetti code.

    Ryan

  6. #26
    Join Date
    Jan 2004
    Location
    South Pole
    Posts
    1,519
    Quote Originally Posted by Astinus
    In my data structures course our instructor specified in his syllabus that if we used gotos anywhere in C++ code he'd auto-fail the assignment He was trying to drive home that they have no place in modern OOP schemes. OOP by nature lends itself to easy readibility and gotos can only counteract that.
    Yeah, I had an instructor that said that too.. and someone gave him a program containing a goto in a comment!

Page 3 of 3 FirstFirst 123

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •