Do you often debug the assembler output of your compiler? Same thing; fix the Fay code, not the Javascript that the compiler generates.
I'm not sure Fay now generates sourcemaps, and either way not all browsers support them.
So it's pretty much guaranteed you'll have to debug generated javascript at some point.
Without reading the article or having used fay, I actually knew that that was a JS translation of `enumFrom` and that you'd probably left out part of it. An editor color scheme could probably reduce the noise of all the "Fay$$" namespacing (or whatever that is) stuff.
I'm not sure I would call it unfair, but I wouldn't call it reasonable or logical. You don't have to use haskell for your front end development if you don't have someone to do it. You don't have to use haskell for your back end development if you don't have someone to do it. He just showed some of what is available if you do want to do it. Our front end developer knows haskell, and works on the backend as well writing haskell. She still doesn't use clay or fay though, she uses SASS and just plain old javascript.
Also, Fay output isn't obfuscated, it is just accurately translating haskell to javascript, which means lazy evaluation.
Also, the example of the compiled JavaScript from Fay is horribly obfuscated:
Oh, God, my eyes. Any idea at all what that does? I can tell you one thing: I would not want to debug that on a Friday night. Or a Tuesday afternoon. Or ever, really.Kind of have to agree with a few of the other commenters here who are saying things along the lines of "You can do anything with a hammer, if a hammer is what you have."
Also: this reminds me of a "LISP for Web Development" talk I went to a few years ago. The speaker was talking to a bunch of web devs about how LISP has an undeserved reputation for being domain specific (academia, astronomy, whatever). He then went on to explain how you could use it for calculating the results of some kind of physics experiment and output it as an HTML table. Uh-huh. My buddy and I walked out after about 25 minutes.
Am I being unfair?
>> As an example of we’ll use JMacro to implement a simple translator for the untyped typed lambda calculus.
Nope.