這是一個關於名字的故事:從印尼爪哇島的咖啡莊園,到荷蘭殖民貿易,再到 Sun 微系統程序員的茶歇靈感,最終成為改變世界的編程語言。本文還原 Java 名字的歷史脈絡,讓你在寫代碼時,腦海裡多一份香氣與厚度。
美劇《行屍走肉》S04E03:老瑞克在監獄避難,流感爆發,藥物短缺。他拿起一個馬克杯,上寫 JAVA SAVES。劇情揭示:亡妻生前用某植物葉煮茶預防感冒——那是板藍根?還是咖啡?
杯子上的字,藏著一段跨越三百年的歷史。
荷蘭人跨越半個地球種咖啡,表面是香氣,底色是血淚:強迫種植制度、榨取農民、壟斷貿易。歷史的車輪碾過,留下的只有名字——Java。
官方說法眾說紛紜,最動人的版本:
「對於經常加班的程序員,提神醒腦的咖啡,是堪比伴侶的最親密夥伴。」
Goodbye to you my trusted friend We've known each other since we were nine or ten Together we've climbed hills and trees Learned of love and ABC's Skinned our hearts and skinned our knees Goodbye my friend it's hard to die When all the birds are singing in the sky Now that spring is in the air Pretty girls are everywhere Think of me and I'll be there We had joy, we had fun We had seasons in the SUN But the hills that we climbed Were just seasons out of time
Sun 落山了,但 Java 還在發光。
['dʒɑːvə]下次當你輸入 public class Main,喝口咖啡,想想那段歷程:從爪哇島的火山坡地,到荷蘭商船的艙底,再到矽谷實驗室的深夜,一路走來,只有代碼與咖啡,不負熱愛。
Session 2 將講述:意圖——Java 設計背後的哲學。敬請期待。