3 ms·
It's give and take. I've been writing Haskell for a long time, and I think just reading slowly is a big help in general when dealing with any Haskell code not w
by aseipp 6y ago
It's give and take. I've been writing Haskell for a long time, and I think just reading slowly is a big help in general when dealing with any Haskell code not written by me. This is true for everything but I find it especially true here. There are stylistic choices concerning the code base that some people would quibble over (please nobody start a flame war over 'lens' thank you) that make it a little more opaque to non-Haskell users though, I think. Like, I wouldn't blame anyone for thinking:
scribe toMem . First . Just . InstrMem =<< dePC <<~ use fetchPC
just doesn't read very well if they don't know it Haskell, though I admit it's perfectly readable and understandable to me, and I think could be explained to a novice with a little help.
If you want an alternative to SystemVerilog, another alternative is Bluespec. It's higher level than SV, but much more productive and easier to get right, too. (Incidentally, Bluespec is also a kind of Haskell, but it has two different kinds of syntax, one inspired by Haskell, and one inspired by SystemVerilog...)
- marcosdumay 6y agoThat line does make me wish for an IDE that automatically display parenthesis around the operators that aren't (.) or ($)... But I remember that the precedence of lenses compared to binding operators is really important. It's just that I didn't write any lenses for a long time.
- tome 6y agoI know Haskell well and I hate to read code like that!