Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Developers cannot live without it.

Developers cannot live without it.

Scheduled Pinned Locked Moved The Lounge
htmlcomtoolsquestion
30 Posts 12 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C CPallini

    The goto statement! Freshly released Lua 5.2[^] provides it. :rolleyes:

    If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
    This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
    [My articles]

    V Offline
    V Offline
    vl2
    wrote on last edited by
    #20

    That's a very wise decision. Lua is a meta-language. Any meta-language MUST provide goto - otherwise implementing higher level constructs could be too complicated.

    C 1 Reply Last reply
    0
    • V vl2

      That's a very wise decision. Lua is a meta-language. Any meta-language MUST provide goto - otherwise implementing higher level constructs could be too complicated.

      C Offline
      C Offline
      CPallini
      wrote on last edited by
      #21

      :confused: Are you joking? :-D

      If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
      This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
      [My articles]

      V 1 Reply Last reply
      0
      • C CPallini

        :confused: Are you joking? :-D

        If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
        This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
        [My articles]

        V Offline
        V Offline
        vl2
        wrote on last edited by
        #22

        No, I'm 100% serious. A typical example: implementing a high-level eDSL for, say, generating a Packrat parser out of the PEG grammar. The most straghtforward translation scheme will involve making a function for each terminal, with a single "failure" label at the end, and all the failed sub-expressions will just goto there. But for a target language without a goto, a compilation scheme would be significantly more complicated.

        C 1 Reply Last reply
        0
        • V vl2

          No, I'm 100% serious. A typical example: implementing a high-level eDSL for, say, generating a Packrat parser out of the PEG grammar. The most straghtforward translation scheme will involve making a function for each terminal, with a single "failure" label at the end, and all the failed sub-expressions will just goto there. But for a target language without a goto, a compilation scheme would be significantly more complicated.

          C Offline
          C Offline
          CPallini
          wrote on last edited by
          #23

          That's just a 'lack of goto' problem. I cannot understand why you define Lua 'meta-language'. Furthermore, in my opinion, it is a complete (and fairly powerful) language.

          If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
          This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
          [My articles]

          V 1 Reply Last reply
          0
          • C CPallini

            The goto statement! Freshly released Lua 5.2[^] provides it. :rolleyes:

            If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
            This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
            [My articles]

            M Offline
            M Offline
            Mark AJA
            wrote on last edited by
            #24

            In BBC BASIC "On Error Off" is used to turn off any error trapping. In Visual Basic "On Error Goto 0" is used to turn off error trapping. But it doesn't go to line zero when an error occur it displays a message and exits the program. So the GOTO command survives but doesn't go to the line you asked it to goto.

            1 Reply Last reply
            0
            • C CPallini

              The goto statement! Freshly released Lua 5.2[^] provides it. :rolleyes:

              If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
              This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
              [My articles]

              Sander RosselS Offline
              Sander RosselS Offline
              Sander Rossel
              wrote on last edited by
              #25

              On Error Go To Bed :)

              It's an OO world.

              public class Naerling : Lazy<Person>{
              public void DoWork(){ throw new NotImplementedException(); }
              }

              C 1 Reply Last reply
              0
              • Sander RosselS Sander Rossel

                On Error Go To Bed :)

                It's an OO world.

                public class Naerling : Lazy<Person>{
                public void DoWork(){ throw new NotImplementedException(); }
                }

                C Offline
                C Offline
                CPallini
                wrote on last edited by
                #26

                public class Naerling : Person{
                public void DoWork(){ throw Unknown(); }
                }

                FFY. :)

                If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
                [My articles]

                Sander RosselS 1 Reply Last reply
                0
                • C CPallini

                  public class Naerling : Person{
                  public void DoWork(){ throw Unknown(); }
                  }

                  FFY. :)

                  If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                  This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
                  [My articles]

                  Sander RosselS Offline
                  Sander RosselS Offline
                  Sander Rossel
                  wrote on last edited by
                  #27

                  Unknown is no function or property I implement. Though I am lazy I still want to compile ;)

                  It's an OO world.

                  public class Naerling : Lazy<Person>{
                  public void DoWork(){ throw new NotImplementedException(); }
                  }

                  1 Reply Last reply
                  0
                  • C CPallini

                    The goto statement! Freshly released Lua 5.2[^] provides it. :rolleyes:

                    If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                    This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
                    [My articles]

                    M Offline
                    M Offline
                    Mark_Wallace
                    wrote on last edited by
                    #28

                    It's not unlike the double-negative in English -- it's only bad when you use it wrongly.

                    I wanna be a eunuchs developer! Pass me a bread knife!

                    C 1 Reply Last reply
                    0
                    • M Mark_Wallace

                      It's not unlike the double-negative in English -- it's only bad when you use it wrongly.

                      I wanna be a eunuchs developer! Pass me a bread knife!

                      C Offline
                      C Offline
                      CPallini
                      wrote on last edited by
                      #29

                      You may say the same for (say) threads, still... :)

                      If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                      This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
                      [My articles]

                      1 Reply Last reply
                      0
                      • C CPallini

                        That's just a 'lack of goto' problem. I cannot understand why you define Lua 'meta-language'. Furthermore, in my opinion, it is a complete (and fairly powerful) language.

                        If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                        This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
                        [My articles]

                        V Offline
                        V Offline
                        vl2
                        wrote on last edited by
                        #30
                        1. There is an eval - so, it is a meta-language, at least to the same extend as JavaScript 2) I use http://metalua.luaforge.net/[^] which is a "true" meta-language It is very powerful indeed. But the languages lacking the goto statement are not very good compilation targets.
                        1 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • World
                        • Users
                        • Groups