计算机语言的笑话

190 篇文章 80 订阅 ¥29.90 ¥99.00
这篇博客以幽默的方式介绍了不同编程语言在执行特定任务时的特点,如C++的多态困扰,Fortran的循环冗余,Pascal的严谨性,Ada的并发限制,Basic的简单趣味,以及各种语言对于“射自己脚”任务的独特诠释。通过这些笑话,揭示了各编程语言的特性和使用体验。
摘要由CSDN通过智能技术生成

 

五花八门的计算机语言常常使我们程序员搞不清正在使用的是哪一种。下面的一次小型会议将有助于澄清你的疑惑。

任务:射你自己的脚

C:射你自己的脚。

C++:你不留神生成了一堆你自己的实例,所以只好挨个射他们的脚。紧急援救是不可能的,因为你不知道哪个是你的真拷贝,哪个只是指向你的指针。

fortran:你逐个射你的脚趾,一直循环到射没了所有的脚趾,然后你读入下一只脚并重复之。如果你没了子弹,你也得接着射,因为你没有意外处理机制。

pascal:编译器不允许你这么干。

ada:在你仔细地包装好了你的脚后,你试图以并行的方式上弹,扣扳机,尖叫,并射你自己的脚。然而,当你试了一下后,发现你的脚类型不对。

prolog:你告诉程序你想射你自己的脚。程序会自动找到具体的计划,不过语法上是不允许把这些计划告诉你的。

basic:你用水枪射你自己的脚。如果是在大系统中,重复直至你的下半身被水浸没。

Visual Basic:你其实只是装出好象是射了你的脚的样子。不过你觉得这么干更有趣所以也不在乎倒底射没射。

paradox:不但你可以射你自己的脚,你的用户也可以。

access:你用枪瞄准了你自己的脚,但子弹却把旁边所有标着borland字样的软盘打出了洞。

assembler:你试图射你自己的脚,结果发现你还得先自己来制造出****,
子弹,瞄准具,和你的脚。

modula2:当终于明白用这个语言什么也干不了时,你一枪射穿了你的脑门。
-----------------------------------------------------------------------------------------------------------------

http://www-users.cs.york.ac.uk/susan/joke/foot.htm

The proliferation of modern programming languages (all of which seem to have stolen countless features from one another) sometimes makes it difficult to remember what language you're currently using. This guide is offered as a public service to help programmers who find themselves in such dilemmas.

C
You shoot yourself in the foot.
C++
You accidently create a dozen instances of yourself and shoot them all in the foot. Providing emergency medical assistance is impossible since you can't tell which are bitwise copies and which are just pointing at others and saying "That's me, over there."

FORTRAN

You shoot yourself in each toe, iteratively, until you run out of toes, then you read in the next foot and repeat. If you run out of bullets, you continue anyway because you have no exception-handling facility.
Pascal
The compiler won't let you shoot yourself in the foot.
Ada
After correctly packaging your foot, you attempt to concurrently load the gun, pull the trigger, scream and shoot yourself in the foot. When you try, however, you discover that your foot is of the wrong type.
Prolog
You tell your program you want to be shot in the foot. The program figures out how to do it, but the syntax doesn't allow it to explain.
BASIC
Shoot yourself in the foot with a water pistol. On big systems, continue until entire lower body is waterlogged.
Visual Basic
You'll really only appear to have shot yourself in the foot, but you'll have so much fun doing it that you won't care.
Paradox
Not only can you shoot yourself in the foot, your users can too.
Access
You try to point the gun at your foot, but it shoots holes in all your Borland distribution diskettes instead.
Assembly Language
You try to shoot yourself in the foot only to discover you must first reinvent the gun, the bullet, and your foot.
Modula-2
After realizing that you can't actually accomplish anything in this language, you shoot yourself in the head.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值