YAPL - Yet Another Programming Language

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Adem24

    YAPL - Yet Another Programming Language

    The World Joint Programming Language Standardization Committe (WJPLSC)
    hereby proclaims to the people of the world that a new programming language
    is needed for the benefit of the whole mankind in the 21st millenium.
    This new language not only differs from existing ones by new features
    and paradigms but which also brings real advantage by rigourously
    preventing bad programmer habits by omitting features which are outdated.
    In the proposed new joint language for the world (codename YAPL)
    several concepts in use by currently used bad languages have been eliminated.
    All UN member countries and organizations are urged to adapt these
    recommendations which are for the benefit and safety of the planet and the mankind:

    1) There is no goto statement.
    Hidden goto's like break- and continue-statements are also omitted.

    2) There is no return statement.
    Instead a result variable can be declared to which the result of a function can be assigned.

    3) There are no automatic type conversions.
    When a subprogram should be used for different types it must be overloaded.

    4) There are no variable length parameter lists.
    Instead it is possible to use arrays as parameters.

    5) There are no default parameters.
    But it is easy to define two subprograms: One with and one without an additional parameter.

    6) There is no special "parameter" called "self" or "this".
    In a procedure the receiving object is declared as formal parameter with a user-defined name.

    7) There is no macro feature since this mechanism is too similar to the subprogram feature.
    Instead subprograms can be used in a more flexible way than in other languages.

    8) There are no reserved words.

    9) There is no conceptual distinction between functions, operators, procedures and statements.

    10) The procedure calling mechanism is not based on a concept with an object-message pair
    (An object receives a message). Instead a match is done over a list of objects.
    This more general (and powerful) mechanism is called multimatch and it includes
    the simple object-message mechanism as special case.


    cu l8er
    Jesus DeCoder



    ..

  • Malcolm McLean

    #2
    Re: YAPL - Yet Another Programming Language


    "Adem24" <adem24@adem24a dem24.org.inval idwrote in message
    1) There is no goto statement.
    Hidden goto's like break- and continue-statements are also omitted.
    >
    2) There is no return statement.
    Instead a result variable can be declared to which the result of a
    function can be assigned.
    >
    3) There are no automatic type conversions.
    When a subprogram should be used for different types it must be
    overloaded.
    >
    4) There are no variable length parameter lists.
    Instead it is possible to use arrays as parameters.
    >
    5) There are no default parameters.
    But it is easy to define two subprograms: One with and one without an
    additional parameter.
    >
    6) There is no special "parameter" called "self" or "this".
    In a procedure the receiving object is declared as formal parameter
    with a user-defined name.
    >
    7) There is no macro feature since this mechanism is too similar to the
    subprogram feature.
    Instead subprograms can be used in a more flexible way than in other
    languages.
    >
    8) There are no reserved words.
    >
    9) There is no conceptual distinction between functions, operators,
    procedures and statements.
    >
    10) The procedure calling mechanism is not based on a concept with an
    object-message pair
    (An object receives a message). Instead a match is done over a list of
    objects.
    This more general (and powerful) mechanism is called multimatch and it
    includes
    the simple object-message mechanism as special case.
    >
    >
    Replace "array" with "list" and you've got Lisp.

    --
    Free games and programming goodies.


    Comment

    • CBFalconer

      #3
      Re: YAPL - Yet Another Programming Language

      Adem24 wrote:
      >
      The World Joint Programming Language Standardization Committe (WJPLSC)
      hereby proclaims to the people of the world that a new programming language
      is needed for the benefit of the whole mankind in the 21st millenium.
      .... snip ...

      This appears to have little to do with the C language, and is thus
      off-topic.

      --
      [mail]: Chuck F (cbfalconer at maineline dot net)
      [page]: <http://cbfalconer.home .att.net>
      Try the download section.


      Comment

      • Keith Thompson

        #4
        Re: YAPL - Yet Another Programming Language

        "Adem24" <adem24@adem24a dem24.org.inval idwrites:
        The World Joint Programming Language Standardization Committe (WJPLSC)
        I see no evidence outside this article that such an organization exists.
        hereby proclaims to the people of the world that a new programming language
        is needed for the benefit of the whole mankind in the 21st millenium.
        Then you've got nearly 18,000 years to work on it. Given the number
        of attempts there have been to create a new universal programming
        language that will Change Everything, that might be almost enough.

        [...]

        Followups to comp.programmin g (though comp.lang.misc might have been
        an appropriate place to post this -- unlike any of the other
        comp.lang.* groups to which it was cross-posted).

        --
        Keith Thompson (The_Other_Keit h) kst-u@mib.org <http://www.ghoti.net/~kst>
        Nokia
        "We must do something. This is something. Therefore, we must do this."
        -- Antony Jay and Jonathan Lynn, "Yes Minister"

        Comment

        • thomas.mertes@gmx.at

          #5
          Re: YAPL - Yet Another Programming Language

          On 29 Jun., 19:27, "Adem24" <ade...@adem24a dem24.org.inval idwrote:
          The World Joint Programming Language Standardization Committe (WJPLSC)
          hereby proclaims to the people of the world that a new programming language
          is needed for the benefit of the whole mankind in the 21st millenium.
          Mr. Adem24 (I have no relationship to him) seems to make a
          joke at my cost. His 10 points are a list of features of Seed7
          mentioned in the manual. See the second list in chapter 1.3:

          Besides sounding funny I have no idea what the intentions of
          Mr Adem24 are. Please accept my apology for sending this
          answer to so much groups. I have humor myself, but I will not
          uncover my plans to reach world domination with Seed7. :-)

          Greetings Thomas Mertes

          Seed7 Homepage: http://seed7.sourceforge.net
          Seed7 - The extensible programming language: User defined statements
          and operators, abstract data types, templates without special
          syntax, OO with interfaces and multiple dispatch, statically typed,
          interpreted or compiled, portable, runs under linux/unix/windows.

          Comment

          • thomas.mertes@gmx.at

            #6
            Re: YAPL - Yet Another Programming Language

            On 29 Jun., 22:09, Keith Thompson <ks...@mib.orgw rote:
            "Adem24" <ade...@adem24a dem24.org.inval idwrites:
            The World Joint Programming Language Standardization Committe (WJPLSC)
            >
            I see no evidence outside this article that such an organization exists.
            >
            hereby proclaims to the people of the world that a new programming language
            is needed for the benefit of the whole mankind in the 21st millenium.
            >
            Then you've got nearly 18,000 years to work on it.
            The 18,000 years are over now, because an implementation
            of such a language already exists (see my direct answer to
            Mr. Adem24). Such effects in time distortion can be explained
            by relativity...

            Greetings Thomas Mertes

            Seed7 Homepage: http://seed7.sourceforge.net
            Seed7 - The extensible programming language: User defined statements
            and operators, abstract data types, templates without special
            syntax, OO with interfaces and multiple dispatch, statically typed,
            interpreted or compiled, portable, runs under linux/unix/windows.

            Comment

            • Matthias Buelow

              #7
              Re: YAPL - Yet Another Programming Language

              Malcolm McLean wrote:
              >1) There is no goto statement.
              > Hidden goto's like break- and continue-statements are also omitted.
              Replace "array" with "list" and you've got Lisp.
              Lisp has goto! :) (GO, and friends like RETURN-FROM etc...)

              If a designer of a general purpose language thinks goto is unnecessary
              (or even "evil"), he should go back to the desk and think a couple years
              more.

              Comment

              • James Kanze

                #8
                Re: YAPL - Yet Another Programming Language

                On Jun 29, 7:27 pm, "Adem24" <ade...@adem24a dem24.org.inval idwrote:
                The World Joint Programming Language Standardization Committe
                (WJPLSC) hereby proclaims to the people of the world that a
                new programming language is needed for the benefit of the
                whole mankind in the 21st millenium. This new language not
                only differs from existing ones by new features and paradigms
                but which also brings real advantage by rigourously preventing
                bad programmer habits by omitting features which are outdated.
                In the proposed new joint language for the world (codename
                YAPL) several concepts in use by currently used bad languages
                have been eliminated. All UN member countries and
                organizations are urged to adapt these recommendations which
                are for the benefit and safety of the planet and the mankind:
                Apparently, this message got held up for some 90 days somewhere.

                --
                James Kanze (GABI Software) email:james.kan ze@gmail.com
                Conseils en informatique orientée objet/
                Beratung in objektorientier ter Datenverarbeitu ng
                9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34

                Comment

                • Chris Dollin

                  #9
                  Re: YAPL - Yet Another Programming Language

                  Matthias Buelow wrote:
                  Malcolm McLean wrote:
                  >
                  >>1) There is no goto statement.
                  >> Hidden goto's like break- and continue-statements are also omitted.
                  >Replace "array" with "list" and you've got Lisp.
                  >
                  Lisp has goto! :) (GO, and friends like RETURN-FROM etc...)
                  >
                  If a designer of a general purpose language thinks goto is unnecessary
                  (or even "evil"), he should go back to the desk and think a couple years
                  more.
                  Oh, yeah?

                  My pop11-inspired Pepper programming language is a "general purpose"
                  imperative programming language that has no goto. It's gotolessness
                  doesn't stop the Pepper compiler from being written in Pepper.

                  Most of the "I'd like a goto here" seems to stem from needing
                  n-and-a-half-times loops (which Pepper has) and poor man's tail
                  recursion (ditto). No "break", no "continue", no "goto".

                  What is missing is some kind of exception-handling ...

                  --
                  "I don't make decisions. I'm a bird." /A Fine and Private Place/

                  Hewlett-Packard Limited registered no:
                  registered office: Cain Road, Bracknell, Berks RG12 1HN 690597 England

                  Comment

                  • thomas.mertes@gmx.at

                    #10
                    Re: YAPL - Yet Another Programming Language

                    On 30 Jun., 11:36, Matthias Buelow <m...@incubus.d ewrote:
                    Malcolm McLean wrote:
                    1) There is no goto statement.
                    Hidden goto's like break- and continue-statements are also omitted.
                    Replace "array" with "list" and you've got Lisp.
                    >
                    Lisp has goto! :) (GO, and friends like RETURN-FROM etc...)
                    >
                    If a designer of a general purpose language thinks goto is unnecessary
                    (or even "evil"), he should go back to the desk and think a couple years
                    more.
                    What about Java?
                    In Java goto is a reserved word but does not presently serve
                    any function.

                    I can assure you that writing unmaintainable spaghetti
                    code is also possible without GOTO statements. :-)

                    Greetings Thomas Mertes

                    Seed7 Homepage: http://seed7.sourceforge.net
                    Seed7 - The extensible programming language: User defined statements
                    and operators, abstract data types, templates without special
                    syntax, OO with interfaces and multiple dispatch, statically typed,
                    interpreted or compiled, portable, runs under linux/unix/windows.

                    Comment

                    • Matthias Buelow

                      #11
                      Re: YAPL - Yet Another Programming Language

                      thomas.mertes@g mx.at wrote:
                      >If a designer of a general purpose language thinks goto is unnecessary
                      >(or even "evil"), he should go back to the desk and think a couple years
                      >more.
                      What about Java?
                      In Java goto is a reserved word but does not presently serve
                      any function.
                      I rest my case.

                      Comment

                      • Juha Nieminen

                        #12
                        Re: YAPL - Yet Another Programming Language

                        Adem24 wrote:
                        1) There is no goto statement.
                        Hidden goto's like break- and continue-statements are also omitted.
                        >
                        2) There is no return statement.
                        Instead a result variable can be declared to which the result of a function can be assigned.
                        Is the goal of this language to make the life of programmers as hard
                        as possible? Something like this becomes difficult to implement:

                        // Find the first value in 'data' which meets the requirements imposed
                        // by the parameter:
                        Type1 foo(Type2 value)
                        {
                        for(size_t i = 0; i < data.size(); ++i)
                        for(size_t j = 0; j < data[i].size(); ++j)
                        for(size_t k = 0; k < data[i][j].size(); ++k)
                        if(meetsRequire ments(data[i][j][k], value)
                        return data[i][j][k];
                        }

                        Comment

                        • campyhapper@yahoo.com

                          #13
                          Re: YAPL - Yet Another Programming Language

                          On Jun 29, 2:51 pm, CBFalconer <cbfalco...@yah oo.comwrote:
                           [mail]: Chuck F (cbfalconer at maineline dot net)
                           [page]: <http://cbfalconer.home .att.net>
                          This appears to have little to do with the C language, and is thus
                          off-topic.

                          Comment

                          • thomas.mertes@gmx.at

                            #14
                            Re: YAPL - Yet Another Programming Language

                            On 30 Jun., 17:43, Juha Nieminen <nos...@thanks. invalidwrote:
                            Adem24 wrote:
                            1) There is no goto statement.
                            Hidden goto's like break- and continue-statements are also omitted.
                            >
                            2) There is no return statement.
                            Instead a result variable can be declared to which the result of a function can be assigned.
                            >
                            Is the goal of this language to make the life of programmers as hard
                            as possible? Something like this becomes difficult to implement:
                            >
                            // Find the first value in 'data' which meets the requirements imposed
                            // by the parameter:
                            Type1 foo(Type2 value)
                            {
                            for(size_t i = 0; i < data.size(); ++i)
                            for(size_t j = 0; j < data[i].size(); ++j)
                            for(size_t k = 0; k < data[i][j].size(); ++k)
                            if(meetsRequire ments(data[i][j][k], value)
                            return data[i][j][k];
                            >
                            }
                            Your function returns garbage when nothing meets the requirements.
                            Your solution may be elegant, but it is wrong (I know that it can
                            be fixed easily). Some people would even argue that with structured
                            programming such bugs would not happen.
                            Besides that, I got your point.

                            Before going to the details let me explain the advantage when every
                            statement has exactly one entry and one exit (this is a side effect
                            of structured programming without any form of goto's):

                            If you want to add code that should be executed when the function
                            is left (e.g. some trace statement) you can just add it at the end
                            of the function. The only reason that your trace code is skipped is
                            when an exception is raised and no exception handler inside the
                            function catches it. If there are no exceptions you know that the
                            flow of control is always stuctured. If you jump around in your
                            code with gotos and returns you don't have this guarantee.

                            A stuctured solution to your example could use a boolean flag which
                            is changed when the data is found. It can be argued that this is
                            slower but todays compiler optimisations should not be
                            unerestimated. A C version of this structured function would be:

                            // Find the first value in 'data' which meets the requirements
                            // imposed by the parameter:
                            Type1 foo (Type2 value)
                            {
                            int search = 1;
                            Type1 result = Type1default;

                            for (size_t i = 0; i < data.size() & search; ++i) {
                            for (size_t j = 0; j < data[i].size() & search; ++j) {
                            for (size_t k = 0; k < data[i][j].size() & search; ++k) {
                            if (meetsRequireme nts(data[i][j][k], value) {
                            result = data[i][j][k];
                            search = 0;
                            }
                            }
                            }
                            }
                            return result;
                            }

                            As you can see, I prefer to use curly braces even when they are not
                            necessary. This use of curly braces allowes that statements
                            belonging to 'while', 'do', 'for' and 'if' statements can always be
                            added or removed without unintentionally changing the logic. The
                            use of a result variable makes clear which function holds the
                            result of the function. Since C needs a return statement I just put
                            it in front of the closing curly brace. IMHO a good compiler can
                            produce code which is as fast as your version.

                            In a language which has no C for loops like Seed7 the function
                            would look as follows:

                            const func Type1: foo (in Type2: aValue) is func
                            result
                            var Type1: result is Type1.value;
                            local
                            var integer: i is 1;
                            var integer: j is 1;
                            var integer: k is 1;
                            var boolean: search is TRUE;
                            begin
                            while i <= maxIdx(data) and search do
                            while j <= maxIdx(data[i]) and search do
                            while k < maxIdx(data[i][j]) and search do
                            if meetsRequiremen ts(data[i][j][k], aValue) then
                            result := data[i][j][k];
                            search := FALSE;
                            end if;
                            incr(k);
                            end while;
                            incr(j);
                            end while;
                            incr(i);
                            end while;
                            end func;

                            I know that this solution is not as elegant.
                            Maybe I should introduce an advanced version of the 'for' statement
                            like:

                            for i range minIdx(data) range maxIdx(data) andWhile search do

                            What do you think?

                            Greetings Thomas Mertes

                            Seed7 Homepage: http://seed7.sourceforge.net
                            Seed7 - The extensible programming language: User defined statements
                            and operators, abstract data types, templates without special
                            syntax, OO with interfaces and multiple dispatch, statically typed,
                            interpreted or compiled, portable, runs under linux/unix/windows.

                            Comment

                            • Roberto Waltman

                              #15
                              Re: YAPL - Yet Another Programming Language

                              <adem24@adem24a dem24.org.inval idwrote:
                              >... a new programming language is needed ...
                              >...
                              8) There are no reserved words.
                              >
                              Wonderful! What the world needs is one more language that allows you
                              to write:

                              "IF IF THEN THEN ELSE IF ELSE THEN IF ELSE IF END THEN BEGIN ELSE IF;"

                              or something like that...
                              --
                              Roberto Waltman

                              [ Please reply to the group,
                              return address is invalid ]

                              Comment

                              Working...