[閒聊] 以下六個分別是什咩語言?

看板PLT (程式語言與理論)作者 (Schelfaniel)時間15年前 (2009/07/02 09:26), 編輯推噓4(404)
留言8則, 5人參與, 最新討論串1/3 (看更多)
取自 PragProg Magazine 2009 7 月號 以下六個分別是什麼語言呢? 1. Process Class Creator; Begin While true do begin Activate New Consumer(Time); Hold(Uniform(5, 15, 1)); End While; End of Creator; 2. <Any T, Any U> T first((T,U) tuple) { (T t, U u) = tuple; return t; } 3. PROC null.farm(CHAN OF ADDR.TASK.STREAM from.farm, CHAN OF ADDR.RESULT.STREAM to.farm ) PAR from.farm ? CASE no.more.task.packets to.farm ! no.more.result.packets : 4. LET start() = VALOF $( FOR i = 1 TO 5 DO writef("%n! = %i4*n", i, fact(i)) RESULTIS 0 $) AND fact(n) = n=0 -> 1, n*fact(n-1) 5. PROCEDURE speak*( VAR bird : Birds.Bird ); BEGIN WITH bird : Cuckoos.Cuckoo DO bird.sound := "Cuckoo!"; | bird : Ducks.Duck DO bird.sound := "Quack!"; ELSE bird.sound := "Tweet!"; END; END setSound; 6. HAI CAN HAS STDIO? IM IN YR LOOP UPPIN YR NUM TIL BOTHSAEM NUM AN 10 VISIBLE SUM OF NUM AN 1 IM OUTTA YR LOOP KTHXBYE -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 163.29.29.137

07/02 09:42, , 1F
[亂入] 沒有 Java...... XDXD
07/02 09:42, 1F

07/02 09:48, , 2F
我只覺得 2 有點眼熟,其他都完全不認得 @@
07/02 09:48, 2F

07/02 09:57, , 3F
答案它下一個月才會公佈,據說把這六個答案出來之後
07/02 09:57, 3F

07/02 09:57, , 4F
名稱連起來還會再得到第七個語言
07/02 09:57, 4F

07/02 09:59, , 5F
2 有點像 Scala 但不太對的是沒 def val var 等字
07/02 09:59, 5F

07/02 10:49, , 6F
第一個很像 Pascal.... @_@
07/02 10:49, 6F

07/02 11:23, , 7F
Pascal 應該不是用 "End While".
07/02 11:23, 7F

07/02 12:45, , 8F
5像Ada可是應該又不是XD
07/02 12:45, 8F
文章代碼(AID): #1AJ0oomM (PLT)
文章代碼(AID): #1AJ0oomM (PLT)