[Haskell-cafe] Soliciting feedback on my lens json parsing tutorial (please don't share yet!)

6 views
Skip to first unread message

Cody Goodman

unread,
Jan 22, 2017, 6:28:27 AM1/22/17
to haskell-cafe
Hi All, I wrote a lens json parsing tutorial here: https://github.com/codygman/concise-json-parsing-in-haskell

I'd appreciate any feedback. My approach tries to use a prior understanding of Python into understanding lens enough to do something useful. Perhaps I can include links to tutorials that cover more of the theoretical foundations as well.

Any criticism and/or ideas is welcome!

Thanks,

Cody Goodman

Will Yager

unread,
Jan 22, 2017, 2:36:50 PM1/22/17
to Cody Goodman, haskell-cafe
Looks good! I would suggest putting near the beginning a note to the effect of "Note: This may look very verbose now, but I am going to explain how to make these statements idiomatic and compact further down. I'm just being explicit now." Otherwise, I would worry about people being scared off by the fact that the parenthesized, non-eta-reduced version is much longer and harder to read than the Python version. 

Maybe also compare the short version to the Python version, just to wrap up the tutorial?

Cheers,
Will
_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.

Geraldus

unread,
Jan 22, 2017, 4:08:31 PM1/22/17
to Will Yager, Cody Goodman, haskell-cafe
Also, after you've defined isHkOrLU function you use it only once (in the same code block), however there are few use cases of "naked" (`elem` ["HK", "LU"]) in the rest part of article.  Would it make sense to substitute them with defined alias?

пн, 23 янв. 2017 г. в 0:37, Will Yager <will....@gmail.com>:
Reply all
Reply to author
Forward
0 new messages