[英]Joe Armstrong:關於Erlang,有很多東西我想改變(圖靈訪談)
Joe Armstrong,Erlang最初的設計者和實現者,他也是Erlang OTP系統專案的首席架構師。他擁有瑞典皇家理工學院博士學位,是容錯系統開發領域的世界級專家。Armstrong起初是一名物理工作者,在攻讀物理學博士學位時因為用完積蓄而轉向了電腦科學,找到一份研究員的工作,為英國人工智慧領域奠基人之一的Donald Michie工作。在此期間,他成為英國機器人學會的創始成員並撰寫了一些有關機器人視覺的論文。人工智慧的資金來源枯竭,Armstrong又回到了物理學領域。開始時他在歐洲非相干散射科學協會工作,後來又到了瑞典空間研究中心,最後加入了愛立信電腦科學實驗室,Erlang就是在那裡發明的。
在現代語言的版圖中,Erlang有點另類。同很多流行的語言相比,它既老又新。早在1986年,也就是Perl出現的前一年,Armstrong就已經開始了Erlang的工作,當時它只作為商用產品出售並且主要在愛立信公司內部使用。這種情況直到1998年Erlang作為開源專案釋出後才發生變化,那時Java和Ruby已經問世3年了。當時Erlang設計初衷也相當明確,它針對的軟體是類似於電話交換機那樣的高可用性、高可靠性系統。
iTuring: There are hundreds of programming languages in the world, some of them are highly efficient and concise, but they have never been widely used. In your opinion, what does it take to make a successful language?
A: A new language has to be extremely good for solving some particular class of problem. The type of problem must be one that people want to solve, and the alternative languages should be bad at solving this problem. For commercial success somebody must be able to earn money by using the language. Use of the language should give some competitive advantage over the use of other languages.
iTuring: What have been the crucial factors that have made Erlang as it is today?
A: Erlang's first opportunity came due to the failure of a large project programmed in a different programming language. We were able to save the project by reprogramming the hardware in Erlang.
The second significant factor was when Erlang was briefly banned by Ericsson in 1998. This led to a sequence of events where Erlang became open source and a number of companies were formed that chose Erlang as their principle technology.
More recently WhatsApp was purchased by Facebook for $19B USD - making this the largest ever software acquisition. WhatsApp was programmed in Erlang, and this fact has attracted a lot of interest.
iTuring: You have commented highly about Elixir. Do you think Erlang will be influenced by Elixir in the future?
A: Yes - but not only by Elixir, also by developments in other languages.
iTuring: How Erlang is going to evolve? Are there any key points?
A: Erlang was developed when machine memories were of the order of a few Megabytes, so we decided to only allow two versions of the same module to co-exist. Now we have Gigabyte memories, so we could have thousands of versions and let the garbage collector remove unused versions.
In the original Erlang implementation, message passing times between processes on the same machine was constant. On multi-core computers this is no longer true, so we have to consider the physical placement of processors on multi-cores.
In the very near future we will see the emergence of massively multi-cores with thousands of CPUs per chip, some of the cores will be broken due to manufacturing problems and so we need to learn how to map Erlang processes onto the available cores.
We also need to understand energy use. For environmental reasons it is important to understand how to maximize performance and simultaneously minimize energy consumption. Massive multi-cores running at low voltages and clock rates can be used to minimize energy consumption, but we still need to do a lot of work to understand how to program these.
iTuring: Do you think Erlang and Scala are rivalries to each other? What are their unique advantages?
A: They are rivals - but Scala is closely tied to the JVM. Scala provides a migration path for Java programmers, but Scala has completely different run-time characteristics to Erlang. There are many problems for which Erlang is good and Scala bad and the other way around.
iTuring: Among concurrent, parallel and distributed programming, which area Erlang does best? And which area it does worst? Why is that?
A: Erlang is best at co-ordinating parallel activities and handling faults, Erlang programs also scale well when run on multi-cores.
Erlang is not good at memory intensive numerical computations. The reason for this has to do with fault-tolerance and memory management. To make things fault-tolerant we have to keep copies of data in different places so if one process crashes we can restart it somewhere else. All this copying takes time. Efficient numerical computations can be done in-memory and without much copying, but this is at the expense of fault-tolerance.
Making things fault-tolerant costs CPU time and memory, so if you don't want fault-tolerant and distribution you would be better off not using Erlang.
iTuring: If you can start again, is there anything you would like to change in Erlang?
A: Yes - many things. But the language is slowly changing. There are several things I'd like to see. Everything should be first class. Modules, for example, are not first class, we can't easily turn a module into a list of functions, or a list of functions into a module. We should be able to construct and deconstruct any Erlang object. Things like protocols, which are implicit, should be made explicit.
The Erlang programming model for distributed programming needs to be extended for "planetary scale distribution". Right now we can register a process on an individual Erlang node, or on a cluster of nodes, but not in away that would allow every computer in the world to access it.
iTuring: XML language doesn't’t seem to fit in today’s environment of big data. What feature the new language ML9 should have to keep up XML’s advantages while eliminating its defects?
A: ML9 was an experiment which I'm no longer maintaining. XML is fine but should never be used for long-term storage or transmission of large volumes of data. XML is great for small configuration files and so on, but not large data volumes.
iTuring: There are many programmers of Ruby, Java, or Python who would like of learn Erlang, do you have some learning suggestions for them?
A: Read my book!
iTuring: You have mentioned that Dave Thomas had advised you a lot about writing, what have you learned from your writing experience? And what advices would you like to give to other new authors?
A: I've really learned to enjoy writing, and to keep on revising and re-writing the text to improve it. I also get a set of mixed readers to read the text and tell me if they understand it. I really appreciate lots of feedback, so if people don't understand what I have written then I can write more explanation. Without feedback I don't know which parts people find easy to understand and which parts are difficult.
For many years I found writing very difficult, at school I was good at math but bad at writing, but I worked at it and Dave Thomas gave me lot's of great advice so now it's the other way around.
The most difficult part of being an author is trying to put yourself in the position of somebody who does not know what you know, so you have to imagine the problems they will have and try and solve them before the have them.
更多精彩,加入圖靈訪談微信!
相關文章
- Joe Armstrong:關於Erlang,有很多東西我想改變(圖靈訪談)圖靈
- 《Erlang程式設計(第2版)》作者Joe Armstrong訪談問題有獎徵集(圖靈訪談)程式設計圖靈
- Erlang之父Joe Armstrong確認將參加中國軟體開發者大會
- 擁抱程式設計年華(摘錄)——Joe Armstrong,Erlang語言之父程式設計
- [英]《Python Web開發》作者Harry Percival:TDD就是微小而漸進的改變(圖靈訪談)PythonWeb圖靈
- Oracle副總裁Tom Kyte:Oracle每天都會教給我一些新東西(圖靈訪談)Oracle圖靈
- Anson:關於Google Glass,我們在做的是未來(圖靈訪談)Go圖靈
- 馮怡:我想給大家展示一種可能性(圖靈訪談)圖靈
- [英]Donald E. Knuth(高德納):總有一些事超越我們的理解(圖靈訪談)圖靈
- [英]Jon Skeet:我不想知道我在SO上到底花了多少時間(圖靈訪談)圖靈
- 圖靈訪談圖靈
- 阮一峰訪談問題有獎徵集(圖靈訪談)圖靈
- 我和圖靈訪談的2017圖靈
- [英]Brian W. Kernighan:我與CS的半個世紀(圖靈訪談)圖靈
- 《決勝UX》作者Jaime Levy: 重要的是,大腦可以創造出很酷的東西(圖靈訪談)UXAI圖靈
- 《機器學習》作者Peter Flach訪談問題有獎徵集(圖靈訪談)機器學習圖靈
- 關於 智慧指標的東西指標
- [英]Bruce Tate:恐懼是我寫作《七週七語言》的初衷(圖靈訪談)圖靈
- 有獎 | 知名科普作家James Gleick訪談話題有獎徵集(圖靈訪談)圖靈
- 《圖靈的祕密》作者Charles Petzold:我眼中的圖靈機和Windows(圖靈訪談)圖靈Windows
- 360前端月影(吳亮)訪談問題有獎徵集(圖靈訪談)前端圖靈
- Hulu(北京)周涵寧訪談話題有獎徵集(圖靈訪談)圖靈
- C++之父Bjarne Stroustrup訪談問題有獎徵集(圖靈訪談)C++JAR圖靈
- 《特斯拉》作者卡爾森教授訪談問題有獎徵集(圖靈訪談)圖靈
- 《釋出!》作者Michael Nygard訪談問題有獎徵集(圖靈訪談)圖靈
- 訪談嘉賓推薦(圖靈訪談)圖靈
- [英]Brian X. Chen:永遠線上的時代(圖靈訪談)圖靈
- [英]專訪《寫給大家看的設計書》作者Robin Williams(圖靈訪談)圖靈
- 再訪Thomas Kyte,圖靈訪談問題有獎徵集圖靈
- @程式設計師鄒欣 訪談問題有獎徵集(圖靈訪談)程式設計師圖靈
- 《CSS揭祕》作者Lea Verou訪談問題有獎徵集(圖靈訪談)CSS圖靈
- 知名著者結城浩,訪談問題有獎徵集(圖靈訪談)圖靈
- 《鳳凰專案》作者基恩·金訪談問題有獎徵集(圖靈訪談)圖靈
- [英]Dave Wooldridge:蘋果應用開發與營銷(圖靈訪談)蘋果圖靈
- [英]《奇思妙想》作者Dennis Shasha:小品電腦科學(圖靈訪談)圖靈
- 紀念阿蘭·圖靈誕辰,評選“精彩·好訪談”(圖靈訪談)圖靈
- 有獎 |《人工智慧簡史》作者尼克訪談話題徵集(圖靈訪談)人工智慧圖靈
- 著名軟體大師Chris Richardson訪談問題有獎徵集(圖靈訪談)圖靈