wordswords's Profile User Rating: -----

Reputation: 76 Whiz
Group:
Author w/DIC++
Active Posts:
273 (0.27 per day)
Joined:
17-December 11
Profile Views:
6,253
Last Active:
User is offline Jun 22 2013 02:00 PM
Currently:
Offline

Previous Fields

Country:
GB
OS Preference:
Mac
Favorite Browser:
Chrome
Favorite Processor:
Intel
Favorite Gaming Platform:
PC
Your Car:
Who Cares
Dream Kudos:
150
Icon   wordswords has not set their status

Posts I've Made

  1. In Topic: Easiest language to learn

    Posted 21 Jun 2013

    View PostAdamSpeight2008, on 22 June 2013 - 12:48 AM, said:

    As I've already mentioned there are some case where you can't. Eg Iterators.

    Edit: Link to tutorial with example


    I suppose. But that sounds like broken language design rather than a legitimate reason to include GoTo. I can understand why you'd use it in that case though.
  2. In Topic: Easiest language to learn

    Posted 21 Jun 2013

    View PostAdamSpeight2008, on 22 June 2013 - 12:30 AM, said:

    Quote

    ... Can't you break to a label ...


    So that would be a GoTo then?


    No. GoTo can be misused horribly. This was what Dijkstra was complaining about when he wrote his paper on 'Goto considered harmful'. For example:

    Label1:
    If Z GoTo Label2
    Label2:
    If Y GoTo Label1
    Label3:
    Goto Label2
    Label4:
    If X GoTo Label3
    
    


    This kind of nonsense should not be allowed. It quickly messes up control flow to the point where it becomes unreadable.

    A break to label, is different because you are only allowed to break a *loop* to that particular label. So it is only used in the way you are using your GOTO.

    Python actually doesn't have a break to a label statement at all, because the inventor considered it unnecessary as only a tiny percentage of code would actually need it.

    Perhaps a better way to address these problems are to write your code using procedures, so that you don't have to nest loops in this way at all.
  3. In Topic: Easiest language to learn

    Posted 21 Jun 2013

    View PostAdamSpeight2008, on 22 June 2013 - 12:22 AM, said:

    Eg while loop.
    BeginingOfLoop:
      If condition = True Then GoTo FollowingCode
      loop code body
      GoTo BeginingOfLoop
    FollowingCode:
    
    


    Seems horrible to me. Can't you break to a label? or just break in general? If you can't do those then I suppose you'll have to use GoTo. Maybe someone should just implement break instead, because that is what you are doing effectively, and get rid of this tiny edge case reason to use GoTo.
  4. In Topic: Easiest language to learn

    Posted 21 Jun 2013

    View Postbaavgai, on 22 June 2013 - 12:02 AM, said:

    On the learning to program front, I thought the Logo introduced with One Laptop Per Child was brilliant. It ultimately became Scratch.


    I think Logo is a good, easy to learn, first programming language.
  5. In Topic: Easiest language to learn

    Posted 21 Jun 2013

    View PostAdamSpeight2008, on 21 June 2013 - 11:49 PM, said:

    Quote

    like GOTO which should just not be used


    GoTo is method local in vb.net (and c#) and is sometimes useful.


    It is my honest and sincere opinion that only crazy misguided beginners use GOTO. Can you explain how you think it should be used in modern programming?

My Information

Member Title:
D.I.C Regular
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:
Years Programming:
13
Programming Languages:
Java, Python, PHP, Bash

Contact Information

E-mail:
Private

Comments

wordswords has no profile comments yet. Why not say hello?