Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > YAPL - Yet Another Programming Language

Reply
Thread Tools

YAPL - Yet Another Programming Language

 
 
Adem24
Guest
Posts: n/a
 
      06-29-2008
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.

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



..

 
Reply With Quote
 
 
 
 
CBFalconer
Guest
Posts: n/a
 
      06-29-2008
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.


 
Reply With Quote
 
 
 
 
Keith Thompson
Guest
Posts: n/a
 
      06-29-2008
"Adem24" <> writes:
> 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.programming (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_Keith) kst- <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"
 
Reply With Quote
 
thomas.mertes@gmx.at
Guest
Posts: n/a
 
      06-29-2008
On 29 Jun., 19:27, "Adem24" <ade...@adem24adem24.org.invalid> 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.

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:
http://seed7.sourceforge.net/manual/intro.htm
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.
 
Reply With Quote
 
thomas.mertes@gmx.at
Guest
Posts: n/a
 
      06-30-2008
On 29 Jun., 22:09, Keith Thompson <ks...@mib.org> wrote:
> "Adem24" <ade...@adem24adem24.org.invalid> writes:
> > 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.
 
Reply With Quote
 
Matthias Buelow
Guest
Posts: n/a
 
      06-30-2008
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.
 
Reply With Quote
 
James Kanze
Guest
Posts: n/a
 
      06-30-2008
On Jun 29, 7:27 pm, "Adem24" <ade...@adem24adem24.org.invalid> 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. 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:
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34
 
Reply With Quote
 
Wolfgang Draxinger
Guest
Posts: n/a
 
      06-30-2008
Adem24 wrote:

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


There are cases, they are scarce but they exist, where goto is
nothing else but really usefull, and makes the simplemost kind
of code. Examples:

Say you got a series of dependent structures, that must be
allocated in a certain order and deallocated in opposite order.
With goto you can:

void foo()
{
Bar bar;
Baz baz;
Bla bla;

int failure = 1;

bar = bar_create();
if(!bar)
goto bar_create_failed;

baz = baz_create(bar);
if(!baz)
goto baz_create_failed;

bla = bla_create(baz);
if(!bla)
goto bla_create_failed;

failure = 0;

/* do some stuff */


bla_destroy(bla);
bla_create_failed:
baz_destroy(baz);
baz_create_failed:
bar_destroy(bar);
bar_create_failed:

if(failure){
/* deal with failure */
}
}

Challenge: Do this with only if, while and for in a more readable
fashion.

Another exercise: Exit from a stack of neested loops to the
outermost structure, or some loop levels above, and perform some
post handling.

for(...){
for(...){
for(...){
if(...)
goto break_loop_3_to_0;

if(...)
goto break_loop_3_to_1;
}
if(...)
goto break_loop_2_to_0;
}
break_loop_3_to_1:
}
goto normal_finish;
{
break_loop_3_to_0;
/* ... */;
goto normal_finish;

}
normal_finish:

Of course I know that Djkstra will now hate me, too (and not only
some guy called Linus T.).

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


Helps you in how far? Makes lambda expressions a PITA.

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


If a type can be converted without possible loss of data, why not
make it implicit. Compilers (should) raise a warning otherwise,
anyway.

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


See the D programming language. D even has a feature, that
variable parameter lists are implicitly converted into an array.

> 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.


In OOP aimed languages such parameters are implicitly created,
but a fixed name is a must, otherwise code is hard to read.

> 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.


Sounds like templates and mixins in the D programming language

> There are no reserved words.


Err, how do you want to code then? Ther muse be a few reserved
words the lexer can recognize. How do you want to reference
preimitive typed then?

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


See the D programming language. Operators are actually calls to
functions named op_add, op_mul, op_cmp and so on.

> 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.


Bug prone and non deterministic. Can make hell break loose (think
about circular calls...)

I designed a language addressing all those aspects to speed up
development of my game engine system. This language also has a
own mechanism for non-goto loop breaking and post error
cleanups, that I presented with the goto dance above. However
even this language still has goto. You never know, when you may
make good use of it.

Wolfgang Draxinger
--
E-Mail address works, Jabber: , ICQ: 134682867

 
Reply With Quote
 
Chris Dollin
Guest
Posts: n/a
 
      06-30-2008
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

 
Reply With Quote
 
thomas.mertes@gmx.at
Guest
Posts: n/a
 
      06-30-2008
On 30 Jun., 11:36, Matthias Buelow <m...@incubus.de> 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.

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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
YAPL - Yet Another Programming Language Adem24 C Programming 37 07-12-2008 09:07 PM
Yet Another Language Compiler (YALC) Roberto Rossi Java 2 02-17-2008 09:19 PM
Yet Another Python Web Programming Question Daniel Bickett Python 8 07-12-2005 02:29 PM
RE: Yet Another Python Web Programming Question Robert Brewer Python 1 07-10-2005 01:38 PM
Yet another book recommendation, but for someone who can program and yet does not the terminology well Berehem C Programming 4 04-28-2005 05:25 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57