4 ms·
I think that the author of this article is mistaking LOC for readability. Despite colorForth being wonderfully concise and independent of any operating system,
by benbenolson 11y ago
I think that the author of this article is mistaking LOC for readability. Despite colorForth being wonderfully concise and independent of any operating system, that doesn't make it convenient or readable for future programmers. Just because something is a number of lines longer than another something, doesn't mean that it's less readable.
Take Perl, for example. I often write Perl scripts, and they're very few lines, but nobody can read them, which is really what matters. So, I'll expand it to be more C-like (calling functions with parentheses, using less implied arguments and scalar/vector contexts, etc.), thus making it very easily readable by people that don't even know Perl. I regard this revised version much better than the more Perl-like and obfuscated (although shorter!) version.
- HillaryBriss 11y agoAbsolutely. LOC isn't the only measure of code quality.
- nchelluri 11y agoI do think readability is key, and found the article intriguing so I took a very brief look at some colorForth sample code: http://colorforth.com/ide.html http://colorforth.com/ide.html . It may be that I'm just extremely new to a very foreign programming language, but I did not understand it at all.
- djsumdog 11y agoI thought I was reading a satire article. That was the first source I found when looking through the site. I still wasn't sure if it was satire or not.
- sklogic 11y agoSmaller code does not necessarily guarantee better readability, but there is a strong correlation. What is more readable, a TCP stack from the Linux kernel, or this [1] 200 lines of code? [1] http://www.moserware.com/2008/04/towards-moores-law-software-part-3-of-3.html http://www.moserware.com/2008/04/towards-moores-law-software...
- srpeck 11y agoFrom reading k/q code (or even C code written like the J Incunabulum http://www.jsoftware.com/jwiki/Essays/Incunabulum http://www.jsoftware.com/jwiki/Essays/Incunabulum), I generally find that it may take me 10x as long to fully understand it due to density and my lack of proficiency, but that still makes me an order of magnitude more efficient than reading (and scrolling!) through the 100x longer mainstream code, often spread out over multiple files and directories. Better yet, referring back to a piece of code I have already read is even faster - I am not hunting or scrolling for anything. I recently experimented with writing a web application in q while limiting myself to a single screenful of code - the efficiency is amazing! I am still trying to figure out what factors contribute, but it reminds of solving math problems. Write down what you know and stare at it - no distractions.