The actor model: Why is Erlang/OTP special? Could you use another language?

后端 未结 6 1754
失恋的感觉
失恋的感觉 2021-01-29 20:23

I\'ve been looking into learning Erlang/OTP, and as a result, have been reading (okay, skimming) about the actor model.

From what I understand, the actor model is simply

6条回答
  •  北海茫月
    2021-01-29 21:23

    I don't like to quote myself, but from Virding's First Rule of Programming

    Any sufficiently complicated concurrent program in another language contains an ad hoc informally-specified bug-ridden slow implementation of half of Erlang.

    With respect to Greenspun. Joe (Armstrong) has a similar rule.

    The problem is not to implement actors, that's not that difficult. The problem is to get everything working together: processes, communication, garbage collection, language primitives, error handling, etc ... For example using OS threads scales badly so you need to do it yourself. It would be like trying to "sell" an OO language where you can only have 1k objects and they are heavy to create and use. From our point of view concurrency is the basic abstraction for structuring applications.

    Getting carried away so I will stop here.

提交回复
热议问题