3 ms·
Try reading this Date module (which is very cleanly written compared to the codebase which I was supposed to maintain) https://github.com/mojolicious/mojo/blob
by codegladiator 7y ago
Try reading this Date module (which is very cleanly written compared to the codebase which I was supposed to maintain)
https://github.com/mojolicious/mojo/blob/master/lib/Mojo/Date.pm https://github.com/mojolicious/mojo/blob/master/lib/Mojo/Dat...
I just find it impossible to glance over it and understand whats happening even though I know what is supposed to be happening there.
Something similar in golang
https://github.com/araddon/dateparse/blob/master/parseany.go https://github.com/araddon/dateparse/blob/master/parseany.go
- nnq 7y agoHmm, that Perl code seems quite irregular / badly structured, I see some regexps are inline while others in named variables, no clear docs of what is the return of functions etc. Beside that, the extra clarity in Go is from using a static language. Also, Perl is inexcusable for having no readable function signatures, that's really a no-go for a modern language :| But for me at least, when I see that wall of boilerplatish Go code, my mind instantly ADHDs away, while those dense squiggles of Perl make me WANT to spend time and focus and solve the puzzle of what they do, I have 10x more chances of paying attention to the Perl code while reading it and maybe even spotting a bug in it :P ...