Earlier quoted context omitted.
Here's a real life tangential example: I'm learning Thai. When I first started it was useful to show the Latin alphabet to get a grasp but it's often difficult or inaccurate to try to express that language without the system designed to express it. For instance, many romanizations lack a tone marker for tonal language, or don't show vowel length when it matters. Or for laughable example of พร, meaning 'blessing' but…
Sure, but to extend your metaphor, using Haskell to teach non-Haskell programmers about monads is like using Thai to teach English speakers the history of Thailand; the language might be better suited for the topic, but the people you're teaching don't know it, and learning it is orthogonal to the actual thing you're trying to teach them.
Monads as a Programming Pattern
81–84 of 84 posts
Re: Monads as a Programming Pattern
#82Earlier quoted context omitted.
> they insist on using Haskell syntax throughout, and this is most likely to be unfamiliar and obtuse to programmers looking for this kind of articles. Indeed, that is a big part of a problem. I find "Functional Programming Jargon" [1] extremely approachable (if you already know modern JS) even though it has been pointed out that their definitions might not be "pure"/correct enough. [1] https://github.com/hemanth/fun…
you know of something like this in Python? I know enough js to read that but I'd prefer python
Re: Monads as a Programming Pattern
#83Earlier quoted context omitted.
It is encapsulation with the mandatory law stating that an encapsulation of an encapsulation must be as deep as a single encapsulation. Note that this informal statement doesn't necessarily mean you have to be encapsulating data. A behavior, a contract, an assertion, compositions of all of these etc can also be encapsulated. Fun ideas (not necessarily true but fun to think about): * Monads kinda convert nesting to co…
Any references that explain the "converts nesting to concatenation" idea? I find it fascinating, in particular because I write a lot of code that works on deeply nested data structures -- structs of values (which can be structs) or lists of values. The distinction between struct, list and value and the need to treat them differently in code is interesting and annoying, and goes beyond merely working with functors and…
Some other references helped me along the way:
* http://www.lihaoyi.com/post/WhatsFunctionalProgrammingAllAbo...
Re: Monads as a Programming Pattern
#84Earlier quoted context omitted.
Any references that explain the "converts nesting to concatenation" idea? I find it fascinating, in particular because I write a lot of code that works on deeply nested data structures -- structs of values (which can be structs) or lists of values. The distinction between struct, list and value and the need to treat them differently in code is interesting and annoying, and goes beyond merely working with functors and…
Do ctrl-f for "Nested Operator Expressions" in this piece: https://martinfowler.com/articles/collection-pipeline/ Some other references helped me along the way: * http://www.lihaoyi.com/post/WhatsFunctionalProgrammingAllAbo... * http://learnyouahaskell.com/chapters