Timeline for How do functional languages handle random numbers?
Current License: CC BY-SA 3.0
        18 events
    
    | when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| May 28, 2019 at 16:49 | comment | added | Simple Fellow | the answer is good from academic perspective. it is functional and it uses Haskell in a crafty way but is it really practical? does any company want their employees to be writing "functional version" when its imperative counterpart can achieve the same thing in fewer lines of code, and would be much simpler to maintain then this rather "convoluted yet beautiful" functional version?does it really make sense to have a functional version of everything. despite the beauty it is an overkill. | |
| Apr 12, 2016 at 4:02 | comment | added | light | Something as seemingly simple as "get a random integer" in an imperative paradigm becomes such a protraction in the functional realm. I wish that purists would relax on the "we need everything to be pure functions" requirement, and accept a little bit of imperativeness in code. If and when such a language proliferates, we'd all truly be able to program with a multi-paradigm approach. Still, this answer is really good. | |
| Jun 28, 2013 at 13:00 | comment | added | RLH | Remarkable answer. I'm not a functional programmer but I do understand most of the concepts and I've "played" with Haskell. This is the type of answer that both informs the questioner and inspires others to dig deeper and learn more about the topic. I wish I could give you a few extra points above the 10 from my up-vote. | |
| Jun 27, 2013 at 21:34 | comment | added | Andres F. | After your clarifications, I understand and love your answer. Great derivation! | |
| Jun 27, 2013 at 16:28 | history | edited | dan_waterworth | CC BY-SA 3.0 | 
                
                    edited body 
                
             | 
| Jun 27, 2013 at 16:15 | vote | accept | Electric Coffee | ||
| Jun 27, 2013 at 15:03 | comment | added | dan_waterworth | @AndresF. I've revised my answer, but I don't think I've sufficiently explained how you might use this is practice, so I might come back to it later. | |
| Jun 27, 2013 at 14:59 | history | edited | dan_waterworth | CC BY-SA 3.0 | 
                
                    added 1198 characters in body 
                
             | 
| Jun 27, 2013 at 14:47 | comment | added | Honza Brabec | I am always glad to read answers like this :) | |
| Jun 27, 2013 at 14:19 | history | edited | dan_waterworth | CC BY-SA 3.0 | 
                
                    added 1433 characters in body 
                
             | 
| Jun 27, 2013 at 14:10 | history | edited | dan_waterworth | CC BY-SA 3.0 | 
                
                    added 1433 characters in body 
                
             | 
| Jun 27, 2013 at 13:49 | comment | added | Lescai Ionel | this makes me want to (re)learn Haskell :) | |
| Jun 27, 2013 at 13:12 | comment | added | dan_waterworth | @AndresF. Ok, I'll revise it a little. | |
| Jun 27, 2013 at 12:31 | comment | added | Andres F. | Nice answer, but it goes a bit too fast with some steps. For example, why would bad :: Random a -> aintroduce inconsistencies? What is bad about it? Please go slowly in the explanation, especially for the first steps :) If you could explain why the "useful" functions are useful, this could be a 1000-point answer! :) | |
| Jun 27, 2013 at 12:17 | history | edited | dan_waterworth | CC BY-SA 3.0 | 
                
                    added 425 characters in body 
                
             | 
| Jun 27, 2013 at 12:09 | comment | added | daniel gratzer | +1 for a good example of Applicative functors/Monads practical usage. | |
| Jun 27, 2013 at 11:32 | history | edited | dan_waterworth | CC BY-SA 3.0 | 
                
                    added 2 characters in body 
                
             | 
| Jun 27, 2013 at 11:27 | history | answered | dan_waterworth | CC BY-SA 3.0 |