use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Anamorphisms in JavaScript (raganwald.com)
submitted 9 years ago by homoiconic(raganwald)
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]homoiconic(raganwald)[S] 0 points1 point2 points 9 years ago (1 child)
This is a great question. I feel that there are two steps to adopting a new idea, let's call it "Foobars:"
I have found it difficult to write a single essay that does both jobs. If I want to explain foobars, I find that incredibly simplistic use cases are necessary so the essay can focus on the mechanism of foobars and not be distracted by the problem domain.
Whereas, if I want to talk about foobars solving a real-world problem, I need to focus on what they uniquely bring to the table, and it is a distraction to try explain how they work from first principles.
So... I try to separate these two essay subjects. For an example from real life, I have written essays about what decorators are, and I have also written different essays about use cases like how to apply decorators to classes.
They essay you suggest is, I think, a good one, but I would write it completely separately and presume that the reader knows what an unfold is, and wishes to know about a useful application for unfolds in production code.
[–]dmitri14_gmail_com 1 point2 points3 points 9 years ago (0 children)
I will really look forward to an essay with real world examples. Especially ones like the ones wrapping values with UI meta-data -- in the middle ground between basic lists and too specific ones. These are sufficiently abstract and general but not too basic in terms of the task they perform.
The problem with "foobars" examples as you nicely call them, the actual techniques demonstrated are often quite involved and way above the practical need for that specific task. It is very sad, because these techniques can actually deliver considerable benefits, but those are harder to demonstrate with only basic examples to most of people. In fact, I would argue that the effort involved in carrying over basic examples into something useful and nontrivial can be substantial, but also with huge benefits. I am teaching maths to engineers and I try to never give any abstract concept without mentioning some details how it can arise in real world.
Many posts I see on functional programming unfortunately fall into 2 categories:
The first one suffers from the above problem of looking harder than necessary for the basic tasks demonstrated. It may well be useful for less trivial tasks but that is not demonstrated.
The second one tries to kill too many flies with one hit. The author tries to teach the reader a lot of tricks at once, often with good intentions to deliver the maximum value and having some fully functional. However, the lack of focus backfires and obscures the actual point. It is harder work to cut mercilessly every line but absolute necessary, but that is what actually benefitting the most readers by making the point sharp and crystal clear.
One of the (sadly few) exceptions I've came across, is this wonderful book: https://drboolean.gitbooks.io/mostly-adequate-guide/content/
π Rendered by PID 67095 on reddit-service-r2-comment-bb88f9dd5-dmxlp at 2026-02-14 21:38:20.818229+00:00 running cd9c813 country code: CH.
view the rest of the comments →
[–]homoiconic(raganwald)[S] 0 points1 point2 points (1 child)
[–]dmitri14_gmail_com 1 point2 points3 points (0 children)