Clojure prende in prestito idee di concorrenza da Haskell?

3

Nell'intervista codice trimestrale con Rich Hickey, Michael Fogus suggerisce che Clojure prende in prestito molto da Haskell:

Fogus:

As someone who only knows Haskell enough to read the papers, Clojure appears to be influenced by it substantially. From the names and operation of core functions—take, drop, iterate, repeat, etc.—to its protocols facility, there is a lot in Clojure that a Haskell programmer would recognize. Can you elaborate on Haskell’s influences on Clojure both positive and negative?

Hickey:

I think Haskell is a fantastic, awe-inspiring piece of work. I haven’t used it in anger, but it certainly was a positive influence. Haskell obviously goes much further than Clojure in pursuing the ideals of functional programing. In particular they differ in the approach to using types to enforce things.

La mia domanda è - Clojure prende in prestito idee di concorrenza da Haskell? Fogus suggerisce qualche sintassi, e ovviamente c'è pigrizia funzionale. Che dire degli STM e degli operatori di concorrenza?

Ipotesi:

  • Sto facendo questa domanda in tono positivo. Penso che sia fantastico che Rich abbia potuto vedere alcuni dei tesori di Haskell e usarli.
posta hawkeye 15.12.2013 - 05:54
fonte

1 risposta

2

L'atmosfera che ottengo è che la più grande influenza su Concurrency in Clojure è Multivalion Concurrency Control - che viene da il mondo del database. Lo vediamo con refs , che fanno parte della memoria transazionale di MVCC Software.

Ciò che è interessante sono le critiche del modello di concorrenza di Clojure di Martin Thompson. La sua richiesta è che in definitiva il modello di scalabilità sia limitato dalla legge di Amdahl . Questo è dovuto al fatto che i ref dipendono da un'operazione di confronto e scambio (CAS), che in definitiva è sequenziale e che alla fine diventerà un collo di bottiglia.

    
risposta data 22.12.2013 - 02:21
fonte

Leggi altre domande sui tag