[Haskell-cafe] Monads: external questions

Michael Jones mike at proclivis.com
Wed Oct 29 14:13:38 UTC 2014


When I took a Lambda Calculus class years ago in Silicon Valley, 90% of the students groaned and complained. They just wanted to learn Java and make money. Having a background in OO design and experience with Eiffel, I was intrigued and stuck with it, building some tools with ML, and later Haskell.

In the workplace it was near impossible to avoid the .Net culture, and most of my code has been C#. But the factors that mattered were:

- Continuity with past languages and tools
- Availability of programmers
- Third party libraries
- Inter langage operability
- Reuse of legacy code

etc

Best I can tell, there is no way to avoid the business context. I suggest that if you have freedom, you need to be multilingual. Many systems could benefit from applying the proper tool to the corresponding problem.

But I will say this, becoming proficient at Haskell really improved my designs by providing an alternative conceptual framework. But, it had a very substantial learning curve. All I can say is trust that even if your core language is procedural, you will be better at that for learning a functional language.

To make Haskell a first class citizen in the IT shops, I think focus would have to shift more to the business context and needs. And certainly more focus in the universities that are still dominated by procedural languages. Once that is drilled into ones head, it affects the way one thinks.

To give an example, I have these problems:

- Update to GHC 7.8.3 from 7.6 caused run time behavior changes breaking USB application
- Sandboxes are not completely isolated from the core library and often builds break
- Most new grads don’t even know what a functional language is
- Documentation gets out of sync with releases (where documentation means Wiki and web)
- FFI is difficult to use and debug
- Lack of books, user groups, etc

Mike

On Oct 29, 2014, at 3:48 AM, Alberto G. Corona <agocorona at gmail.com> wrote:

> I know that I'm using a different language when talking about monads. The language of the IT industry. 
> 
> Many haskellers use the language for toy programming. Others are professional academics. The few that use the language for commercial purposes are too busy developing practical applications rather than thinking deep about how to apply the haskell concepts to their problems.   As a result many of such problems remains essentially unsolved. These busy developers try to transcode solutions from other languages that lack the deep and expressiveness of Haskell.
> 
> This lack of interest in one side and the lack of time in the other is disappointing. The symptoms are everywhere. Particularly, I find it in the lack of support and interests for this ticket:
> 
> https://ghc.haskell.org/trac/ghc/ticket/7870
> 
> I though that there was definitively a shift from "avoid success at all costs" a few years ago, for a commitment for the success, but still there are many minds to change, especially the brilliant ones. 
> 
> 2014-10-26 2:02 GMT+01:00 Alberto G. Corona <agocorona at gmail.com>:
> 
> 
> 2014-10-26 1:23 GMT+02:00 Jeffrey Brown <jeffbrown.the at gmail.com>:
> As opposed to the internal logic of monads, how they work, I hope to start a discussion about their external logic: how and why to use monads.
> 
> design
> ------
> How do monads change the way one   
> 	* thinks about a problem?   
> 	* structures data?   
> 	* refactors?   
> 	* tests?
> Should I always be giving the monads a lot of cognitive bandwidth, because they reorder the way everything should be, or is it an investment with a high initial cognitive cost but requiring little maintenance thereafter?
>                                                     
> what is their common framework?
> -------------------------------
> Monads let data reach farther than it otherwise would. Subjectively, they feel like a controlled way of violating encapsulation.
> 
> Are there other, deeper or more specific, commonalities that explain why monads are a good way to implement exceptions, output, state, and perhaps other services?
> 
> I made monads for execution state recovery, web navigation.. workflows,  long running transactions, backtracking, traceback and event chaining in web browser applications.  
> 
> I´m confident that the perspectives for monads to solve real IT problems are very promising. And when I mean monad I mean all the associated stuff : applicative, alternative etc.  
> 
> I´m confident that there will be a cloud monad (for chaining jobs and work distribution) an orchestration monad for orchestration of web services etc.
> 
> There are problems that are intrinsically procedural among them, almost all problems in IT. instead of using ad-hoc  data/control structures like events, handlers, configurations, routes, exceptions, logs, transaction compensations, promises ....the list goes on and on , the monad is the common control structure that can subsume all of them inside his programmable semicolon
> 
> So, once the monad is set up, the user of the monad code the solution for the domain problem in a clean EDSL with absolutely no plumbing, at the level of the problem. so anyone that know the problem can understand the code. 
> 
> Is the monad instance, and the applicative etc the ones that subsume under the hood the special data/control structure necessary for the domain problem.
> 
> 
> Often if your code is general enough, it can be used in any monad. So you benefit from this. I think that in th future there will be a lot of surprises about the shareability of code between monads when the IT industry start to use them seriously. I think that we are just at the beginning.
> 
> I hope that some others of your questions are also answered here
> 
> 
> 
> -- 
> Alberto.
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20141029/e7435f94/attachment.html>


More information about the Haskell-Cafe mailing list