4 ms·
I wholeheartedly agree, especially with the "unable to read a line" comment the author has. Perhaps he has never seen the "Lazy" nodejs library which lets you
by euank 12y ago
I wholeheartedly agree, especially with the "unable to read a line" comment the author has.
Perhaps he has never seen the "Lazy" nodejs library which lets you simply do new Lazy(fs.createReadStream("data.txt").lines.forEach(handleLine));
The claim that "other programming languages have ways to read lines" is sort of true in that many do, but they don't do it significantly more efficiently than implementing it as above.
Nodejs certainly is minimalistic if you look at the core modules, but the minimalism does not get in the way of accomplishing the goals the author describes; rather it simply leaves them up to userland to implement (which they have been many times).