471,089 Members | 1,123 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,089 software developers and data experts.

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

..

Jun 29 '08 #1
43 3345

"Adem24" <ad****@adem24adem24.org.invalidwrote 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.
http://www.personal.leeds.ac.uk/~bgy1mm

Jun 29 '08 #2
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.
Jun 29 '08 #3
"Adem24" <ad****@adem24adem24.org.invalidwrites:
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) ks***@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"
Jun 29 '08 #4
On 29 Jun., 19:27, "Adem24" <ade...@adem24adem24.org.invalidwrote:
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.
Jun 29 '08 #5
On 29 Jun., 22:09, Keith Thompson <ks...@mib.orgwrote:
"Adem24" <ade...@adem24adem24.org.invalidwrites:
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.
Jun 30 '08 #6
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.
Jun 30 '08 #7
On Jun 29, 7:27 pm, "Adem24" <ade...@adem24adem24.org.invalidwrote:
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:ja*********@gmail.com
Conseils en informatique oriente objet/
Beratung in objektorientierter Datenverarbeitung
9 place Smard, 78210 St.-Cyr-l'cole, France, +33 (0)1 30 23 00 34
Jun 30 '08 #8
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

Jun 30 '08 #9
On 30 Jun., 11:36, Matthias Buelow <m...@incubus.dewrote:
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.
Jun 30 '08 #10
th***********@gmx.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.
Jun 30 '08 #11
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(meetsRequirements(data[i][j][k], value)
return data[i][j][k];
}
Jun 30 '08 #12
On Jun 29, 2:51*pm, CBFalconer <cbfalco...@yahoo.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.
Jun 30 '08 #13
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(meetsRequirements(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 (meetsRequirements(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 meetsRequirements(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.
Jun 30 '08 #14
<ad****@adem24adem24.org.invalidwrote:
>... 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 ]
Jun 30 '08 #15
Roberto Waltman said:
<ad****@adem24adem24.org.invalidwrote:
>>... 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...
Your wish is my command.

Here is the source code for a compiler for the BETTIE (Begin/Else/Then/er,
Then/If/End) language:

/* BETTIE Compiler

The BETTIE (Begin/Else/Then/er, Then/If/End) language
has five keywords: BEGIN, ELSE, THEN, IF, and END.

I'll let you figure out the semantics for yourself.

Richard Heathfield, 1 July 2008
*/
#include <stdio.h>
#include <string.h>

#define LW 16

int t(unsigned long int n)
{
static unsigned long l = 0;
char x[] = "Oh? Oh! Oh okay.";
l==0 || putchar(' ');
putchar(x[(n & 0xFF000000) >24]);
putchar(x[(n & 0xFF0000) >16]);
putchar(x[(n & 0xFF00) >8]);
putchar(x[n & 0xFF]);
++l==LW && putchar('\n');
l%=LW;
return 1;
}

int main(void)
{
char i[256] = {0};
int ms = 0;
while(1 == scanf("%255s", i))
{
if(strcmp(i, "ELSE") == 0)
{
ms = !ms;
}
else
{
if(strcmp(i, "BEGIN") == 0)
{
(ms && t(0xB0C0F) && t(0xB0C06)) ||
(t(0xB0C06) && t(0xB0C02));
}
else if(strcmp(i, "END") == 0)
{
(ms && t(0xB0C06) && t(0xB0C0F)) ||
(t(0xB0C02) && t(0xB0C06));
}
else if(strcmp(i, "THEN") == 0)
{
(ms && t(0xB0C0F) && t(0xB0C02)) ||
(t(0xB0C02) && t(0xB0C0F));
}
else if(strcmp(i, "IF") == 0)
{
(ms && t(0xB0C0F) && t(0xB0C0F)) ||
(t(0xB0C06) && t(0xB0C06));
}
else
{
fprintf(stderr, "Syntax error: %s\n", i);
}
}
}
putchar('\n');
return 0;
}

And here is a "hello world" program written in BETTIE:

ELSE THEN IF IF IF IF IF IF IF IF IF ELSE BEGIN THEN ELSE IF
IF IF IF IF IF IF IF THEN ELSE IF END THEN ELSE END THEN IF IF
IF IF IF IF IF ELSE BEGIN THEN ELSE IF IF IF IF THEN ELSE IF
END THEN ELSE IF END IF IF IF IF IF IF IF END END IF IF IF END
THEN THEN THEN IF IF IF IF IF IF IF IF ELSE BEGIN THEN ELSE IF
IF IF IF THEN ELSE IF END THEN ELSE END THEN THEN THEN IF IF
IF IF IF IF IF IF IF IF ELSE BEGIN THEN ELSE IF IF IF IF IF IF
IF IF IF THEN ELSE IF END THEN IF IF IF ELSE END ELSE THEN THEN
THEN THEN ELSE END IF IF IF END ELSE IF IF IF IF IF IF ELSE END
ELSE IF IF IF IF IF IF IF IF ELSE END THEN THEN IF END

--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
Jul 1 '08 #16
ca*********@yahoo.com wrote:
CBFalconer <cbfalco...@yahoo.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.
You appear to be an idiot unable to recognize a sig. marker. Bye.

--
[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home.att.net>
Try the download section.
Jul 1 '08 #17
rio

"Adem24" <ad****@adem24adem24.org.invalidha scritto nel messaggio
news:g4**********@aioe.org...
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.
I would take "if() goto" and "goto" and would loose if(), while(), for(), do
while(),
etc

For me the base language has to have these points
1) No UB so people instead of speak of UB, they program
2) So it should be easy to master and to program so that whatherver
someone write something, there is not much of say about "grammar"
3) If there is some error in writing something it stop to run
4) it is easy to read and to write
5) it should have only few instruction, no if-loop controls only
conditionals jumps and gotos

so it should be some subset of some cpu assembly
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

Jul 1 '08 #18
On Jun 29, 12:27�pm, "Adem24" <ade...@adem24adem24.org.invalidwrote:
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 themankind:

�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 theresult 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 andone 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 waythan 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

.
Item 1 states that hidden Goto's are omitted. To the list which is
given (Continue and Break) the proposer should add For, While, Repeat,
If-Then-Else as well as procedure and function calls.
Jul 1 '08 #19
On Jun 30, 11:46 pm, "rio" <a...@b.cwrote:
"Adem24" <ade...@adem24adem24.org.invalidha scritto nel messaggionews:g4**********@aioe.org...
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.

I would take "if() goto" and "goto" and would loose if(), while(), for(), do
while(),
etc

For me the base language has to have these points
1) No UB so people instead of speak of UB, they program
2) So it should be easy to master and to program so that whatherver
someone write something, there is not much of say about "grammar"
3) If there is some error in writing something it stop to run
4) it is easy to read and to write
5) it should have only few instruction, no if-loop controls only
conditionals jumps and gotos

so it should be some subset of some cpu assembly
All those things are exactly what most modern programming languages
try to omit/discourage (except point 4). I'm not surprised what you
say in point 2 about not being there much to say about grammar, since
4 of your 5 points have grammatical errors. :)
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
Jul 1 '08 #20
On 30 Jun., 12:04, Wolfgang Draxinger <wdraxin...@darkstargames.de>
wrote:
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, ...
Others have already answered to this. Just one point:
In Java goto is a reserved word but does not presently serve any
function.
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.
Why should that make any problems with lambda expressions?
Seed7 (the list is an almost exact copy from the Seed7 manual) uses
result variables which represent the function result when the
function is left. The user can define the name of the result
variable and it can be used like a normal variable. This is similar
to Pascal where the function name is used as result variable. The
difference is that in Pascal normal usages of the function name
(which are not at the left side of an := ) are interpreted as
recursive calls and not as usages of the result variable. In the
following function definition a result variable is used:

const func string: gets (inout string: stri,
in integer: leng) is func
result
var string: result is "";
begin
result := stri[.. leng];
stri := stri[succ(leng) ..];
end func;

As you can see the name of the result variable is 'result'. Although
'result' is also used as keyword in the function declaration this
does not imply that all keywords can be used as variable names. The
keyword 'result' is used in the middle of a syntactic construct (it
just follows the keyword 'func'). As such it does not introduce
something. Therefore the keyword 'result' can be used as variable
name. Most other keywords like 'if', 'while', 'for' , etc. introduce
a statement (or some other construct) and therefore it cannot be
used as variable name.
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.
The avoidance of implicit conversions gives us something:

For every expression (and sub expression) you know its type at
compile time without knowing where this expression is used.

This principle improves the readability of code.
I am discussing this also in the FAQ, see:
http://seed7.sourceforge.net/faq.htm#automatic_casts
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.
As I said already I am not a fan of implicit conversions.
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.
I see no reason why code is hard to read when a user supplied name
can be used. Non-OO languages had user defined parameter names for
ages. If you want you can use 'this' as user defined parameter name.
BTW: How do you name your 'this' variables when you use multiple
dispatch? Don't say 'this1', 'this2', ...

What multiple dispatch is, is explained here:
http://seed7.sourceforge.net/faq.htm#multiple_dispatch
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
Seed7 supports templates, but instead of special template constructs
normal functions are used. Seed7 functions can use types as
parameters and/or a type as function result. Such template functions
are executed at compile time and may declare things like functions.
In this function declarations the type parameters can be used.
That way no special template syntax with angle brackets or similar
constructs is necessary.
8) 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?
There are keywords which are used at various places. Some keywords
introduce statements or other constructs (such as declarations).
E.g.: The keywords 'if', 'while', 'repeat', 'for', and some others
introduce statements. Other keywords like 'do', 'range', 'result,
etc. are used in the middle of statements (or other constructs).

Seed7 uses syntax declarations to specify the syntax of statements.
I use the word 'keyword' when a name is used somewhere in a syntax
declaration. Syntax declarations reduce the possibilitys to use
a keyword out of context. E.g: After the keyword 'if' the lexer
expects always an expression. This makes 'if' unusable as variable
name. This way you get error messages when you try to use 'if' as
variable name. That behaviour is just the same as in other languages
which have reserved words.
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.
Connecting operators and functions with a mapping like + --op_add
is one possibility. In Seed7 new operators can be invented, but
there is no user visible mapping to a function name.
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 see no reason why this should be the case. The technic to connect
a method to more than one type is called multiple dispatch. I wrote
an explanation of multiple dispatch here:
http://seed7.sourceforge.net/faq.htm#multiple_dispatch

If there are questions, just ask.
I am happy with every feedback.

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.
Jul 1 '08 #21
On 1 Jul., 00:17, Roberto Waltman <use...@rwaltman.comwrote:
<ade...@adem24adem24.org.invalidwrote:
... 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...
Sorry, but Seed7 (the list is an almost exact copy from the Seed7
manual) does not support this. The keyword 'if' is not reserved in
the classic sense, but the syntax defined for 'if' requests that an
expression follows it. Since variables are not written this way, it
is not possible to define a variable named 'if'.

It can be subsumed that Seed7 reaches the goal of avoiding the
misuse of keywords in other ways and not by reserving them
altogether.

If you look at classic compilers (e.g. a Pascal compiler) there is a
distinction between reserved words and identifiers. Pascal compilers
and probably also Ada, C/C++, Java and C# compilers use an
enumeration type to represent the reserved words.

Since Seed7 allows user defined statements (which may introduce new
keywords) it is not possible to hardcode reserved words in the
compiler as it is done in Pascal, Ada, C/C++, Java and many other
compilers.

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.
Jul 1 '08 #22
th***********@gmx.at said:
On 1 Jul., 00:17, Roberto Waltman <use...@rwaltman.comwrote:
><ade...@adem24adem24.org.invalidwrote:
>... 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...
Sorry, but Seed7 (the list is an almost exact copy from the Seed7
manual) does not support this.
BETTIE does.

See elsethread (or http://www.cpax.org.uk/prg/portable/bettie/ if you
prefer) for details.

Since BETTIE does support it and Seed7 doesn't, we must conclude that
BETTIE is the more powerful language (bless her).

--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
Jul 1 '08 #23
On 1 Jul., 11:31, Richard Heathfield <r...@see.sig.invalidwrote:
thomas.mer...@gmx.at said:
On 1 Jul., 00:17, Roberto Waltman <use...@rwaltman.comwrote:
<ade...@adem24adem24.org.invalidwrote:
... 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...
Sorry, but Seed7 (the list is an almost exact copy from the Seed7
manual) does not support this.

BETTIE does.
I am sure that the world needs another esotheric programming
language. :-)
Since BETTIE does support it and Seed7 doesn't, we must conclude that
BETTIE is the more powerful language (bless her).
You obviously don't understand the Force ...

Look at the Seed7 homepage, it will introduce you to the Force.

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.
Jul 1 '08 #24
th***********@gmx.at wrote:
On 30 Jun., 12:04, Wolfgang Draxinger <wdraxin...@darkstargames.de>
wrote:
>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, ...
Others have already answered to this. Just one point:
In Java goto is a reserved word but does not presently serve any
function.
Before 1988,
"entry" was a keyword in C that served no purpose.
Now, it's not a keyword anymore.

--
pete
Jul 1 '08 #25
th***********@gmx.at said:
On 1 Jul., 11:31, Richard Heathfield <r...@see.sig.invalidwrote:
>thomas.mer...@gmx.at said:
On 1 Jul., 00:17, Roberto Waltman <use...@rwaltman.comwrote:
<ade...@adem24adem24.org.invalidwrote:
... 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...
Sorry, but Seed7 (the list is an almost exact copy from the Seed7
manual) does not support this.

BETTIE does.

I am sure that the world needs another esotheric programming
language. :-)
That's correct. In fact, you are now the second person to say so - and as
the Bellman nearly said, "What comp.lang.c tells you three times is true."
So all I need do is say:

The world is in desperate need of another Turing-complete but stupid
programming language!

Ladies and gentlemen, I give you - BETTIE!

http://www.cpax.org.uk/prg/portable/bettie/

--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
Jul 1 '08 #26
On 1 Jul., 13:38, Richard Heathfield <r...@see.sig.invalidwrote:
thomas.mer...@gmx.at said:
On 1 Jul., 11:31, Richard Heathfield <r...@see.sig.invalidwrote:
thomas.mer...@gmx.at said:
On 1 Jul., 00:17, Roberto Waltman <use...@rwaltman.comwrote:
<ade...@adem24adem24.org.invalidwrote:
... 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...
Sorry, but Seed7 (the list is an almost exact copy from the Seed7
manual) does not support this.
BETTIE does.
I am sure that the world needs another esotheric programming
language. :-)

That's correct. In fact, you are now the second person to say so - and as
the Bellman nearly said, "What comp.lang.c tells you three times is true."
So all I need do is say:

The world is in desperate need of another Turing-complete but stupid
programming language!
There are never enough programming languages. :-) I got your irony,
but I would like to discuss the reserved word vs. keyword issue (and
other issues).

As I said already elsthread, the misuse of keywords is prohibited in
Seed7. Just because the compilers of most programming languages use
a table of hardcoded reserved words does not imply that this is the
only solution.

I know that new concepts start in a hostile world, but objective
professional feedback is the preferred reaction to them.

I hope that the new ways that I take in some areas do not discourage
you to think about them. I would be glad if you answer with a
professional view towards my ideas. Besids the points mentioned by
the OP the FAQ (see: http://seed7.sourceforge.net/faq.htm ) is a
good starting point for a professional response.

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.
Jul 1 '08 #27
th***********@gmx.at said:

<snip>
>
[...] Just because the compilers of most programming languages use
a table of hardcoded reserved words does not imply that this is the
only solution.
True enough. My own preferred solution is to divide the world into two
namespaces. User namespace begins with an alphabetic character, and *no*
language feature may interfere with that - i.e. no keywords or library
routines may begin with an alphabetic letter. Alas, some languages don't
even follow /their own/ namespace schemes, let alone mine. (For example, C
introduced the restrict keyword in C99. User space? Ha! Stomp stomp
stomp...)
I know that new concepts start in a hostile world, but objective
professional feedback is the preferred reaction to them.
Oh, I know. I just found it quite amusing that, within a hundred or so
minutes of its being requested, I was able not only to design a language
that met the specification, but also implement a (portable!) compiler for
it and provide a sample program written in that language. (Within those
hundred minutes I also devised a *de*compiler, which I didn't bother to
publish.) I'm not sure whether anyone has actually got the whole joke
yet...

Anyway, FWIW, creativity is what counts. Keep coming up with new ideas, and
eventually some of them *might* get through the thick skulls of the CS
community.

<snip>

--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
Jul 1 '08 #28
th***********@gmx.at wrote:
>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(meetsRequirements(data[i][j][k], value)
return data[i][j][k];

}
Your function returns garbage when nothing meets the requirements.
Most compilers will issue a warning, though.
A stuctured solution to your example could use a boolean flag which
is changed when the data is found.
Exactly how is that different from 'break'? (Let's assume a 'break'
which can take as parameter how many nested loops it breaks from, like
some languages have. In other words, you could do a "break 3;" in the
example above, assuming it was supported.)

The only difference I can see is that the 'break' would be
compiler-supported (and thus easier for the compiler to optimize), while
the boolean solution is user-written, which is more work and clumsier.
Also, I don't believe the boolean solution would make the code any
easier to understand and follow than the 'break' solution.
// 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 (meetsRequirements(data[i][j][k], value) {
result = data[i][j][k];
search = 0;
}
}
}
}
return result;
}
Another point: Assume that initializing the return value is a very
heavy operation. If a result is found, you are initializing the return
value twice, for no reason. (If the found value was returned from inside
the loop, and if the loops end without result, the default value is
returned, the return value would then always be initialized only once.)
In fact, it would be enough for the default value to be very heavy to
construct for this problem to happen.

Sure, you could add yet another boolean to take care of that... Is
this supposed to make the code easier to write and read, and/or less
error-prone?
As you can see, I prefer to use curly braces even when they are not
necessary.
That's mostly a matter of style and preference. I omitted them mostly
for brevity (ie. it doesn't mean I consistently avoid the braces in real
code whenever I can).

Btw, why do you use the braces in an inconsistent way?
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 meetsRequirements(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'm sorry but I have to confess that doesn't look like very attractive
to me. The 9 lines of code in my original function (with the fix of
returning the default value at the end) vs. 23 lines in your example. I
honestly can't say your version is more readable either.

Let's make it clear that I'm all against compact obfuscated code.
However, there's a limit where code becomes *too* verbose to be comfortable.
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?
A 'for' clause is always a handy shortcut for 'while', so why not.

I also think you should really consider 'break' (perhaps even the
version which takes a parameter, as I mentioned above).
Jul 1 '08 #29
On Jun 30, 10:38*pm, CBFalconer <cbfalco...@yahoo.comwrote:
campyhap...@yahoo.com wrote:
CBFalconer <cbfalco...@yahoo.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.

You appear to be an idiot unable to recognize a sig. marker. *Bye.
Your immaturity has little to do with the C language, and is thus
off-topic.
Jul 1 '08 #30
"Juha Nieminen" wrote:
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(meetsRequirements(data[i][j][k], value)
return data[i][j][k];
}
I do the same :-)

My nested loop techniques:

1) If I need to return a value then I use this method (the same as above):

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 (meetsRequirements(data[i][j][k], value)
return data[i][j][k];
2) If I need to break nested loops without using 'goto' then I use this method:
TCLoopBreaker is a tiny helper class I wrote for this purpose.
It is a "direct access stack".
When I find time to document it then I'll post it here.
It is simply a directly accessible stack implemented using a std::vector

size_t i, j, k; // loop vars

TCLoopBreaker<size_tLB;
LB.push(i, true);
LB.push(j, true);
LB.push(k, true);

for (i = 0; i < data.size(); ++i)
for (j = 0; j < data[i].size(); ++j)
for (k = 0; k < data[i][j].size(); ++k)
if (meetsRequirements(data[i][j][k], value)
{
//... do whatever you want here

LB.breakall(); // this break's all loops
}
3) Optimization for both cases:

If the size of the data containers don't change in these loops,
then, if possible, one better can/should use a const helper, like here:

const size_t ie = data.size(),
je = data[0].size(),
ke = data[0][0].size();

for (size_t i = 0; i < ie; ++i)
for (size_t j = 0; j < je; ++j)
for (size_t k = 0; k < ke; ++k)
if (meetsRequirements(data[i][j][k], value)
return data[i][j][k];
Jul 2 '08 #31
On 1 Jul., 19:02, Richard Heathfield <r...@see.sig.invalidwrote:
thomas.mer...@gmx.at said:
[...] Just because the compilers of most programming languages use
a table of hardcoded reserved words does not imply that this is the
only solution.

True enough. My own preferred solution is to divide the world into two
namespaces. User namespace begins with an alphabetic character, and *no*
language feature may interfere with that - i.e. no keywords or library
routines may begin with an alphabetic letter.
Algol had something like that (although implementation dependend).
Every keyword had to be quoted or should start with a dot.
Alas, some languages don't
even follow /their own/ namespace schemes, let alone mine. (For example, C
introduced the restrict keyword in C99. User space? Ha! Stomp stomp
stomp...)
My solution to this is: Every program must request the language
version it is written in. Currently C would have 3 versions: K&R,
C89 and C99. Compilers should take this into account and old
programs could be used without change. Seed7 is better suited for
this feature than C, since all it's statements are defined in the
include file "seed7_05.s7i". Therefore another include file could
define a different language.
I know that new concepts start in a hostile world, but objective
professional feedback is the preferred reaction to them.

Oh, I know. I just found it quite amusing that, within a hundred or so
minutes of its being requested, I was able not only to design a language
that met the specification, but also implement a (portable!) compiler for
it and provide a sample program written in that language. (Within those
hundred minutes I also devised a *de*compiler, which I didn't bother to
publish.) I'm not sure whether anyone has actually got the whole joke
yet...
Actually I got your joke quickly. I just did not want to talk about
esoteric languages like Ook!
Anyway, FWIW, creativity is what counts. Keep coming up with new ideas, and
eventually some of them *might* get through the thick skulls of the CS
community.
It is not my intention to drill holes in thick skulls.
I see it more as an offer:

Seed7 is open source and it is an
extensible programming language.

Everybody can insert his ideas by using the extensibility
mechanisms or by changing the source. That means that
even the outdated concepts discussed in this thread
could be inserted. It is just not my intention to do so.

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.
Jul 3 '08 #32
On Sun, 29 Jun 2008 19:27:56 +0200, "Adem24"
<ad****@adem24adem24.org.invalidwrote:
>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.
11) Because no sane programmer in his or her right mind will adopt
YAPL on their own volition, Adolf Hitler, Benito Mussolini, and Hideki
Tojo will be resurrected from the dead to serve on a Task Force
Committee that will insure that YAPL rules the world. Any revolt by
the Yanks and Brits should be easy to overcome.

12) The project kickoff date for YAPL is December 7, 2008. Grandiose
events are planned for this date, to take place at the convention
center in Pearl Harbor, Hawaii. Parallel events will take place in
Tokyo, Berlin, and Rome. All of these events will be simulcasted live
on satellite TV, which will be distributed to markets around the
world. Viewer discretion is not advised.

Jul 3 '08 #33
s0****@gmail.com wrote:
On Jun 30, 11:46 pm, "rio" <a...@b.cwrote:
>"Adem24" <ade...@adem24adem24.org.invalidha scritto nel
messaggionews:g4**********@aioe.org...
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.

I would take "if() goto" and "goto" and would loose if(), while(),
for(), do while(),
etc

For me the base language has to have these points
1) No UB so people instead of speak of UB, they program
2) So it should be easy to master and to program so that whatherver
someone write something, there is not much of say about "grammar"
3) If there is some error in writing something it stop to run
4) it is easy to read and to write
5) it should have only few instruction, no if-loop controls only
conditionals jumps and gotos

so it should be some subset of some cpu assembly

All those things are exactly what most modern programming languages
try to omit/discourage (except point 4). I'm not surprised what you
say in point 2 about not being there much to say about grammar, since
4 of your 5 points have grammatical errors. :)
Actually, IMHO, all his points (except for 5) have some merit, though he
hasn't worded them well.

Jul 3 '08 #34
On 3 Jul., 11:52, santosh <santosh....@gmail.comwrote:
s0s...@gmail.com wrote:
On Jun 30, 11:46 pm, "rio" <a...@b.cwrote:
"Adem24" <ade...@adem24adem24.org.invalidha scritto nel
messaggionews:g4**********@aioe.org...
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.
I would take "if() goto" and "goto" and would loose if(), while(),
for(), do while(),
etc
For me the base language has to have these points
1) No UB so people instead of speak of UB, they program
2) So it should be easy to master and to program so that whatherver
someone write something, there is not much of say about "grammar"
3) If there is some error in writing something it stop to run
4) it is easy to read and to write
5) it should have only few instruction, no if-loop controls only
conditionals jumps and gotos
so it should be some subset of some cpu assembly
All those things are exactly what most modern programming languages
try to omit/discourage (except point 4). I'm not surprised what you
say in point 2 about not being there much to say about grammar, since
4 of your 5 points have grammatical errors. :)

Actually, IMHO, all his points (except for 5) have some merit, though he
hasn't worded them well.
Are you speaking about the 10 points of the original poster
or about the 5 points mentioned by "rio"?

If you were speaking about the 10 points of the OP:
How would you write them?

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.
Jul 3 '08 #35
On 29 Jun., 19:27, "Adem24" <ade...@adem24adem24.org.invalidwrote:
The World Joint Programming Language Standardization Committe (WJPLSC)
hereby proclaims to the people of the world that a new programming language
is needed ...
It is interesting to see that a programming language is attacked
for being "too restrictive" and beeing "too liberal" at the same
time. Reasons why Seed7 can be seen as too liberal:

1) User defined statements and operators.

2) Statements like 'for' or 'while' are declared in the language
itself.

3) Types are first class objects.

4) Templates and generics can be defined easily without special
syntax.

6) Abstract data types like arrays and structs are declared in the
language itself.

7) User definable abstract data types.

8) Object orientation is based on interfaces.

9) Supports multiple dispatch (not to be confused with
multiple inheritance).

10) Allows to connect methods to objects.

11) Overloading of procedures/functions/operators/statements

12) Various predefined types like strings, arrays, hashes,
bitsets, structs, bigInteger, bigRational, time, duration,
color, etc.

13) Resizable arrays where the upper and lower bound can change.

Before answering, how stupid it is to support user defined
statements, I suggest to consult the Seed7 FAQ:
http://seed7.sourceforge.net/faq.htm

Seeing that there are user defined statements and that the whole
thing is open source should wipe away all "too restrictive"
arguments:

1) If you think that a feature is missing you can add it using
the extensibility features of Seed7.

2) In case the extensibility features are not powerful enough
for your super duper statement, you still have the possibility
to change the source of the interpreter and compiler (all code
in the Seed7 package is under the GPL/LGPL).

As always: Any feedback is welcome.

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.
Jul 3 '08 #36
th***********@gmx.at wrote:
On 1 Jul., 00:17, Roberto Waltman <use...@rwaltman.comwrote:
<ade...@adem24adem24.org.invalidwrote:
>... 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...
Sorry, but Seed7 (the list is an almost exact copy from the Seed7
manual) does not support this. The keyword 'if' is not reserved in
the classic sense, but the syntax defined for 'if' requests that an
expression follows it. Since variables are not written this way, it
is not possible to define a variable named 'if'.
Ok, so you have no reserved keywords, but you have specific, predefined
words which are reserved for certain contexts and have certain meanings.
Right.
I presume that you also have no "goto" statement, but you have this
"jump" syntax definition which just happens to change program flow? And
that you have no distinction between functions and statements, but that
some statements can be called from other statements and some can not?
It can be subsumed
That word does not mean what you think it means.
that Seed7 reaches the goal of avoiding the misuse of keywords in
other ways and not by reserving them altogether.
It can also be assumed that George Bush Junior didn't reach the goal of
being president by getting Jeb to bend the rules in Florida and not by
outright fraudulent behaviour. Nevertheless...

Richard
Jul 3 '08 #37
th***********@gmx.at wrote:
Just because the compilers of most programming languages use
a table of hardcoded reserved words does not imply that this is the
only solution.
True, for example, (Common) Lisp doesn't have any reserved words; you
can redefine anything, and still access the original interpretation
through the common-lisp package (namespace). One can even rebind many of
those although in practice, this is of course discouraged (and, by
default prevented, by most Lisp systems).
Jul 3 '08 #38
th***********@gmx.at wrote:
On 3 Jul., 11:52, santosh <santosh....@gmail.comwrote:
>s0s...@gmail.com wrote:
On Jun 30, 11:46 pm, "rio" <a...@b.cwrote:
"Adem24" <ade...@adem24adem24.org.invalidha scritto nel
messaggionews:g4**********@aioe.org...
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.
>I would take "if() goto" and "goto" and would loose if(), while(),
for(), do while(),
etc
>For me the base language has to have these points
1) No UB so people instead of speak of UB, they program
2) So it should be easy to master and to program so that
whatherver someone write something, there is not much of say about
"grammar" 3) If there is some error in writing something it stop
to run 4) it is easy to read and to write
5) it should have only few instruction, no if-loop controls only
conditionals jumps and gotos
>so it should be some subset of some cpu assembly
All those things are exactly what most modern programming languages
try to omit/discourage (except point 4). I'm not surprised what you
say in point 2 about not being there much to say about grammar,
since 4 of your 5 points have grammatical errors. :)

Actually, IMHO, all his points (except for 5) have some merit, though
he hasn't worded them well.
Are you speaking about the 10 points of the original poster
or about the 5 points mentioned by "rio"?
The latter. I didn't give much attention to the starting post because it
was clearly an attempt to troll.
If you were speaking about the 10 points of the OP:
How would you write them?
I think points 3, 4 and 7 are admirable, but the others points seem to
me to be overly restrictive. But then much of my experience with PLs
have been with "traditional" ones like C, C++, assembler, BASIC etc.
Certainly it seems paranoid, to me, to dispense with unconditional
jumps, default parameters, and explicit return statements. To much
striving for abstraction or "elegance" can also, IMO, lead to an overly
complex language. But I have mostly used PLs to construct programs and,
to be honest, haven't given the design of the languages themselves much
thought, so you would want better feedback than mine.

Jul 3 '08 #39
On 1 Jul., 19:29, Juha Nieminen <nos...@thanks.invalidwrote:
thomas.mer...@gmx.at wrote:
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(meetsRequirements(data[i][j][k], value)
return data[i][j][k];
}
Your function returns garbage when nothing meets the requirements.

Most compilers will issue a warning, though.
Of course.
Btw. If you look at the Seed7 homepage at
http://seed7.sourceforge.net
you will see that it supports user defined statements.
That way missing features can be added.

When I thought about adding statements I had 'select' statements
and similar constructs in my mind, but there is generally no
restriction.

So it would be possible to add goto, break, continue and return
statements. But I don't think that this is the way to go.
There is a tendency to replace gotos with structured solutions:
- Standard Pascal has no return, break or continue statement.
- Java has no goto statement

Instead of introducing all features present in any language (Seed7
could do that, at least to some degree) it think that care should be
taken when a new feature like a statement is added.

I would say that in most cases structured programs (where every
construct has one entry and one exit) are easier to read (at least
when you are used to it). But there are exceptions, like the one you
wrote. Such exceptions (where a 'return' makes the code simpler)
are an indication that some structured statements still may be
missing.

My question is: How should a loop statement look like when you
want to avoid a 'return' in your example? At the same time the
code should still be elegant to some degree.

One possibility would be a

for key i range data andWhile search do

loop. With this loop the foo() function would look like.

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
for key i range data andWhile search do
for key j range data[i] andWhile search do
for key k range data[i][j] andWhile search do
if meetsRequirements(data[i][j][k], aValue) then
result := data[i][j][k];
search := FALSE;
end if;
end for;
end for;
end for;
end func;

This is just a draft and values which are heavvy to initialize
are a different issue. But maybe you have a better idea.

As you can see: I suggest we use the hardest way when designing
a language (instead of introducing all features that are
theoretically possible) in the hope that the users can benefit
from this efforts.

The benefit of such structured programming is, that you can always
add some logging (or other) statement at the end of a function, and
the execution of that statement is guaranteed.

I have seen programs where maintenance statements (such as free() )
have been ommitted unintentionally at some of the returns.

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.
Jul 3 '08 #40
On 3 Jul., 13:58, r...@hoekstra-uitgeverij.nl (Richard Bos) wrote:
thomas.mer...@gmx.at wrote:
On 1 Jul., 00:17, Roberto Waltman <use...@rwaltman.comwrote:
<ade...@adem24adem24.org.invalidwrote:
... 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...
Sorry, but Seed7 (the list is an almost exact copy from the Seed7
manual) does not support this. The keyword 'if' is not reserved in
the classic sense, but the syntax defined for 'if' requests that an
expression follows it. Since variables are not written this way, it
is not possible to define a variable named 'if'.

Ok, so you have no reserved keywords, but you have specific, predefined
words which are reserved for certain contexts and have certain meanings.
Right.
Wrong. The interpreter does not know about any reserved words.
Seed7 uses syntax declarations like:

$ syntax expr: .if.().then.().end.if is -25;

They are gathered in the include file "syntax.s7i". The syntax
declaration above specifies what is to be expected after the keyword
'if'. The core of the syntax declaration is interesting:

if () then () end if

It defines the syntax of a simple if statement. The symbols () are
nonterminal symbols while 'if', 'then', 'end' and 'if' are terminal
symbols. Terminal symbols which are used in at least one syntax
declaration are called keyword. The interpreter does
not hardcode the keywords somewhere.

I am preparing a chapter about syntax declarations. It will describe
the details of them. As soon as I have something together I plan to
release a preview chapter in the comp.programming newsgroup.
I presume that you also have no "goto" statement, but you have this
"jump" syntax definition which just happens to change program flow?
Bzzzzt. Wrong. There are primitive actions upon which the statements
are based. There are primitive actions for if, while, repeat, for,
case and other statements. But there is no primitive action for goto,
jump or whatever you are thinking of to change the program flow in an
unstructured way. If there is really a desire to add a goto statement
it would be necessary to add a corresponding primitive action.
And
that you have no distinction between functions and statements, but that
some statements can be called from other statements and some can not?
Totally wrong. There is a type system which takes care to check for
types statically. There are types which are used for closures. Such
a closure type is helpful when defining a statement (with some
statement syntax). But functions (which use the classic function
call syntax) can also use closures.
It can be subsumed

That word does not mean what you think it means.
Thank you for the hint. Read instead:

It can be summarized
that Seed7 reaches the goal of avoiding the misuse of keywords in
other ways and not by reserving them altogether.
[totally unrelated statement snipped]

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.
Jul 3 '08 #41
<th***********@gmx.atwrote:
On 1 Jul., 19:29, Juha Nieminen <nos...@thanks.invalidwrote:
thomas.mer...@gmx.at wrote:
>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(meetsRequirements(data[i][j][k], value)
> return data[i][j][k];
>}
Your function returns garbage when nothing meets the requirements.
Most compilers will issue a warning, though.

Of course.
Btw. If you look at the Seed7 homepage at
http://seed7.sourceforge.net
you will see that it supports user defined statements.
That way missing features can be added.

When I thought about adding statements I had 'select' statements
and similar constructs in my mind, but there is generally no
restriction.

So it would be possible to add goto, break, continue and return
statements. But I don't think that this is the way to go.
There is a tendency to replace gotos with structured solutions:
- Standard Pascal has no return, break or continue statement.
- Java has no goto statement

Instead of introducing all features present in any language (Seed7
could do that, at least to some degree) it think that care should be
taken when a new feature like a statement is added.

I would say that in most cases structured programs (where every
construct has one entry and one exit) are easier to read (at least
when you are used to it). But there are exceptions, like the one you
wrote. Such exceptions (where a 'return' makes the code simpler)
are an indication that some structured statements still may be
missing.

My question is: How should a loop statement look like when you
want to avoid a 'return' in your example? At the same time the
code should still be elegant to some degree.

One possibility would be a

for key i range data andWhile search do

loop. With this loop the foo() function would look like.

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
for key i range data andWhile search do
for key j range data[i] andWhile search do
for key k range data[i][j] andWhile search do
if meetsRequirements(data[i][j][k], aValue) then
result := data[i][j][k];
search := FALSE;
end if;
end for;
end for;
end for;
end func;

This is just a draft and values which are heavvy to initialize
are a different issue. But maybe you have a better idea.

As you can see: I suggest we use the hardest way when designing
a language (instead of introducing all features that are
theoretically possible) in the hope that the users can benefit
from this efforts.

The benefit of such structured programming is, that you can always
add some logging (or other) statement at the end of a function, and
the execution of that statement is guaranteed.

I have seen programs where maintenance statements (such as free() )
have been ommitted unintentionally at some of the returns.
You unfortunately do not adress one important aspect in programming:
portable fast code. Ie. your above technique is IMO not efficient
as it tests the search flag with each increment of the loop var.
See my previous posting where I adressed also the "Optimization" issue
and gave an example on how to break deeply nested loops.
The "breakall" technique for nested loops I presented
can easily be implemented in any language using standard elements
of the language.
BTW, my OP which initiated this thread was just a parody against dictatorship etc... :-)
Take it with humor please :-)

Jul 3 '08 #42
On 3 Jul., 19:13, "Adem24" <ade...@adem24adem24.org.invalidwrote:
<thomas.mer...@gmx.atwrote:
On 1 Jul., 19:29, Juha Nieminen <nos...@thanks.invalidwrote:
thomas.mer...@gmx.at wrote:
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(meetsRequirements(data[i][j][k], value)
return data[i][j][k];
}
Your function returns garbage when nothing meets the requirements.
Most compilers will issue a warning, though.
Of course.
Btw. If you look at the Seed7 homepage at
http://seed7.sourceforge.net
you will see that it supports user defined statements.
That way missing features can be added.
When I thought about adding statements I had 'select' statements
and similar constructs in my mind, but there is generally no
restriction.
So it would be possible to add goto, break, continue and return
statements. But I don't think that this is the way to go.
There is a tendency to replace gotos with structured solutions:
- Standard Pascal has no return, break or continue statement.
- Java has no goto statement
Instead of introducing all features present in any language (Seed7
could do that, at least to some degree) it think that care should be
taken when a new feature like a statement is added.
I would say that in most cases structured programs (where every
construct has one entry and one exit) are easier to read (at least
when you are used to it). But there are exceptions, like the one you
wrote. Such exceptions (where a 'return' makes the code simpler)
are an indication that some structured statements still may be
missing.
My question is: How should a loop statement look like when you
want to avoid a 'return' in your example? At the same time the
code should still be elegant to some degree.
One possibility would be a
for key i range data andWhile search do
loop. With this loop the foo() function would look like.
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
for key i range data andWhile search do
for key j range data[i] andWhile search do
for key k range data[i][j] andWhile search do
if meetsRequirements(data[i][j][k], aValue) then
result := data[i][j][k];
search := FALSE;
end if;
end for;
end for;
end for;
end func;
This is just a draft and values which are heavvy to initialize
are a different issue. But maybe you have a better idea.
As you can see: I suggest we use the hardest way when designing
a language (instead of introducing all features that are
theoretically possible) in the hope that the users can benefit
from this efforts.
The benefit of such structured programming is, that you can always
add some logging (or other) statement at the end of a function, and
the execution of that statement is guaranteed.
I have seen programs where maintenance statements (such as free() )
have been ommitted unintentionally at some of the returns.

You unfortunately do not adress one important aspect in programming:
portable fast code. ...
I have some experience in producing portable fast programs. Just
look at the speed of the hi (Seed7) interpreter. 200000 lines per
second are not uncommon. There are also cases where my bigInteger
library (written in portable C) is faster than GMPs (written partly
in assembler). But there are always new things to learn and there is
always room to improve.

The general consensus about optimisations is:

1) Write a program in a way that makes it readable.
2) Make sure that the program works as exprected.
3) If it is too slow, use compiler optimisation flags.
4) If it is still too slow do benchmarks.
5) Think over better algorithms for the slow parts.
6) When this is not enough, use lower optimisation technics.
7) Do benchmarks to verify that a speedup has been reached.

For library optimisation there are additional rules:

- Try to do performance tests for a wide range of testsets.
- Try to do optimisations for this wide range even when
your program seems to be fast enough.

Seed7 uses several technics which help to reach good performace

- It does static type checks
- A static function dispatch is done, when possible.
- Seed7 can be compiled to C.
- There is a possibility to pass-through the -O option to the
C compiler.
Ie. your above technique is IMO not efficient
as it tests the search flag with each increment of the loop var.
This check will be optimized away by the C compiler.
In the innermost loop it is neccesary to check

meetsRequirements(data[i][j][k], aValue)

as long as the element which meets the requirements is not found or
until the size of the array is reached.

A good optimizing compiler (such as gcc) will recognize that there
is only one place where the boolean flag 'search' is set to TRUE.
Therefore it can remove the check for the 'search' flag in the loop
condition by a jump out of the loop when 'search' is set to TRUE.
In the outer loops similar replacements are done.

In the end both versions (with return and with boolean flag) will
produce very similar machine code. If you don't belive me, I suggest
you do some benchmarks.
See my previous posting where I adressed also the "Optimization" issue
and gave an example on how to break deeply nested loops.
The "breakall" technique for nested loops I presented
can easily be implemented in any language using standard elements
of the language.
An optimizing compiler can produce good code for this "break from a
deep nested loop" without any stack manipulating tricks done by a
smart programmer.

Have you ever looked at the machine code produced by an optimizing
compiler? The code is so heavily changed to a clever network of
gotos, that it is hard to recognize the original statements. And
at this level I think that goto's are ok.

I think that you underestimate the optimisations done by todays
compilers totally. It has been said that in most cases todays
compilers produce better machine code than hand crafted assembler
written by humans. Probably fans of assembler know 1000 examples
where this is not the case...
BTW, my OP which initiated this thread was just a parody against dictatorship etc... :-)
Take it with humor please :-)
It's okay.
Generally I do not like to be compared with dictators.

It is NOT my intention to set any form of dictatorship among the
programmers. The Seed7 package contains the work of many years and
I give it away for free under the GPL. Seed7 is an offer and
everybody is invited to join the Seed7 community.

If you think that Seed7 is missing features, you are invited to add
them.

Some programming languages are dominated by big companies. They earn
money by pushing their languages to the developers. Do you think
that this are the good guys?

Btw. Seed7 has also been critisized for beeing too liberal. There
are people who find the idea of user defined statements and
operators frightening.

As always: Any feedback is welcome.

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.
Jul 4 '08 #43
On 3 Jul., 14:57, santosh <santosh....@gmail.comwrote:
thomas.mer...@gmx.at wrote:
On 3 Jul., 11:52, santosh <santosh....@gmail.comwrote:
s0s...@gmail.com wrote:
On Jun 30, 11:46 pm, "rio" <a...@b.cwrote:
"Adem24" <ade...@adem24adem24.org.invalidha scritto nel
messaggionews:g4**********@aioe.org...
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.
I would take "if() goto" and "goto" and would loose if(), while(),
for(), do while(),
etc
For me the base language has to have these points
1) No UB so people instead of speak of UB, they program
2) So it should be easy to master and to program so that
whatherver someone write something, there is not much of say about
"grammar" 3) If there is some error in writing something it stop
to run 4) it is easy to read and to write
5) it should have only few instruction, no if-loop controls only
conditionals jumps and gotos
so it should be some subset of some cpu assembly
All those things are exactly what most modern programming languages
try to omit/discourage (except point 4). I'm not surprised what you
say in point 2 about not being there much to say about grammar,
since 4 of your 5 points have grammatical errors. :)
Actually, IMHO, all his points (except for 5) have some merit, though
he hasn't worded them well.
Are you speaking about the 10 points of the original poster
or about the 5 points mentioned by "rio"?

The latter. I didn't give much attention to the starting post because it
was clearly an attempt to troll.
If you were speaking about the 10 points of the OP:
How would you write them?

I think points 3, 4 and 7 are admirable, but the others points seem to
me to be overly restrictive. But then much of my experience with PLs
have been with "traditional" ones like C, C++, assembler, BASIC etc.
Certainly it seems paranoid, to me, to dispense with unconditional
jumps, default parameters, and explicit return statements. To much
striving for abstraction or "elegance" can also, IMO, lead to an overly
complex language. But I have mostly used PLs to construct programs and,
to be honest, haven't given the design of the languages themselves much
thought, so you would want better feedback than mine.
How about an extension library, which contains some
of the functionality missed by you and others?

Since Seed7 is extensible it would be possible to
create such a library. That way everybody can decide
between a strict and and a less strict language.

What things from the list would you suggest to be
defined in such an extension library?

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.
Jul 12 '08 #44

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

134 posts views Thread by evolnet.regular | last post: by
25 posts views Thread by Dave | last post: by
7 posts views Thread by Robert Seacord | last post: by
14 posts views Thread by deko | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.