Amine Moulay Ramdane <aminer68@gmail.com>: Dec 26 04:33PM -0800 Hello.. Read again, i correct some typos about pure functional programming languages and composability.. I am a white arab and i think i am smart since i have invented many scalable algorithms and algorithms.. I have just read about pure functional programming on internet, and i think they are not talking about an important thing, since i think that pure functional programming languages have a major disadvantage, here it is: Read about MVar of the pure functional programming language that we call Haskell here: https://www.oreilly.com/library/view/parallel-and-concurrent/9781449335939/ch07.html So notice in the following code of Haskell from the above link: main = do m <- newEmptyMVar forkIO $ do putMVar m 'X'; putMVar m 'Y' r <- takeMVar m print r r <- takeMVar m print r I am understanding it , since it is also like a fork of Linux, so as you are noticing that with MVars of Haskell we can implement such as event object and futures and such that also are energy efficient because of the blocking nature of MVars, but notice carefully that we can have two kinds of deadlocks and here they are: 1- Communication deadlocks that result from incorrect use of synchronization event objects or condition variables (i.e. wait- notify synchronization). 2- Resource deadlocks, a common kind of deadlock in which a set of threads blocks forever because each thread in the set is waiting to acquire a lock held by another thread in the set. So notice carefully that with the primitive of Haskell that we call MVar we can implement synchronization event objects or futures that are prone to Communication deadlocks, so then we can say that Haskell is prone to those kinds of deadlocks, so then it is not composable. Thank you, Amine Moulay Ramdane. |
Amine Moulay Ramdane <aminer68@gmail.com>: Dec 26 04:26PM -0800 Hello.. About pure functional programming languages and composability.. I am a white arab and i think i am smart since i have invented many scalable algorithms and algorithms.. I have just read about pure functional programming on internet, and i think they are not talking about some important things, since i think that pure functional programming languages has a major disadvantage, here it is: Read about MVar of the pure functional programming language that we call Haskell here: https://www.oreilly.com/library/view/parallel-and-concurrent/9781449335939/ch07.html So notice in the following code of Haskell from the above link: main = do m <- newEmptyMVar forkIO $ do putMVar m 'X'; putMVar m 'Y' r <- takeMVar m print r r <- takeMVar m print r I am understanding it , since it is also like a fork of Linux, so as you are noticing that with MVars of Haskell we can implement such as event object and futures and such that also are energy efficient because of the blocking nature of MVars, but notice carefully that we can have two kinds of deadlocks and here they are: 1- Communication deadlocks that result from incorrect use of event objects or condition variables (i.e. wait-notify synchronization). 2- Resource deadlocks, a common kind of deadlock in which a set of threads blocks forever because each thread in the set is waiting to acquire a lock held by another thread in the set. So notice carefully that with the primitive of Haskell that we call MVar we can implement event objects or futures that are prone to Communication deadlocks, so then we can say that Haskell is prone to those kinds of deadlocks, so then it is not composable. Thank you, Amine Moulay Ramdane. |
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page. To unsubscribe from this group and stop receiving emails from it send an email to comp.programming.threads+unsubscribe@googlegroups.com. |
No comments:
Post a Comment