YAPL - 又一种编程语言 [英] YAPL - Yet Another Programming Language

查看:181
本文介绍了YAPL - 又一种编程语言的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

世界联合编程语言标准化委员会(WJPLSC)

特此向世界人民宣布,为了整体利益,需要一种新的编程语言

人类在21世纪。

这种新语言不仅与现有的语言不同,还有新功能

和范例,但这也带来了真正的优势

通过省略过时的功能来防止糟糕的程序员习惯。

在世界上提出的新联合语言(代号为YAPL)

当前使用的几个概念正在使用中语言已被消除。

敦促所有联合国成员国和组织调整这些为了地球和人类的利益和安全而提出的建议:


1)没有goto语句。

隐藏的goto'就像break-continue和continue语句一样也被省略。


2)没有返回统计数据ement。

而是可以声明一个结果变量,可以为其分配一个函数的结果。


3)没有自动类型转换。

当子程序应该用于不同的类型时,必须重载。


4)没有可变长度参数列表。

相反,可以使用数组作为参数。


5)没有默认参数。

但是很容易定义两个子程序:一个用没有额外参数的那个。


6)没有特殊的参数称为自我或者this。

在一个过程中,接收对象被声明为带有用户定义名称的形式参数。


7)没有宏功能,因为这个机制与子程序功能太相似了。

相反,子程序可以比其他语言更灵活地使用。


8)那里没有保留的话。


9)函数,运算符,程序和语句之间没有概念上的区别。


10)程序调用机制不是基于具有对象 - 消息对的概念

(对象接收消息)。而是在对象列表上进行匹配。

这种更通用(和强大)的机制称为multimatch,它包含

简单的对象消息机制作为特例。

cu l8er

Jesus DeCoder


..

解决方案



" Adem24" < ad **** @ adem24adem24.org.invalidwrote in message


1)没有goto语句。

Hidden goto'就像break和continue语句一样也省略了。


2)没有返回语句。

而是可以声明一个结果变量可以分配

函数的结果。


3)没有自动类型转换。

当子程序应该用于不同的类型它必须是

重载。


4)没有可变长度参数列表。

相反它可以使用数组作为参数。


5)没有默认参数。

但是很容易定义两个子程序:一个有一个子程序,一个没有一个

附加参数。


6)没有特殊的参数称为自我或者this。

在一个过程中,接收对象被声明为具有用户定义名称的形式参数




7)没有宏功能,因为这个机制与

子程序功能太相似了。

相反,子程序可以比其他子程序更灵活地使用br $> b $ b语言。


8)没有保留字。


9)函数之间没有概念上的区别,运营商,

程序和声明。


10)程序调用机制不是基于具有

对象的概念-message对

(一个对象收到一条消息)。而是在

对象列表上进行匹配。

这种更通用(和强大)的机制称为multimatch,它

包括

简单的对象消息机制作为特例。



替换数组用list你有Lisp。


-

免费游戏和编程好东西。
http://www.personal.leeds.ac.uk/~bgy1mm


Adem24写道:


>

世界联合编程语言标准化委员会(WJPLSC) )

特此向世界人民宣布,为了全人类在21世纪的利益,需要一种新的编程语言




.... snip ...


这似乎与C语言没什么关系,而且是因此

偏离主题。


-

[邮件]:Chuck F(cinefalconer at maineline dot net)

[page]:< http://cbfalconer.home.att.net>

尝试下载部分。


< BLOCKQUOTE>" Adem24" < ad **** @ adem24adem24.org.invalidwrites:


世界联合编程语言标准化委员会(WJPLSC)



我发现本文之外没有任何证据证明这样的组织存在。


特此向世界人民宣告一种新的编程语言



那么你已经有近18000年的时间来完成它。鉴于尝试数量为
的尝试,已经创建了一个新的通用编程

语言,它将改变一切,这可能已经足够了。


[...]


comp.programming的后续工作(尽管comp.lang.misc可能是

发布此内容的合适位置 - 不同于其他任何其他

comp.lang。*群组,它被交叉发布)。


-

Keith Thompson(The_Other_Keith) ks***@mib.org < http://www.ghoti.net/~kst> ;

诺基亚

我们必须做点什么。这是事情。因此,我们必须这样做。

- Antony Jay和Jonathan Lynn,是部长


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

..

解决方案


"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


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.


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


这篇关于YAPL - 又一种编程语言的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆