Re:Node v8.5.0
by blitmap on Tuesday September 12, 2017 @11:24PM
(#15235266)
I probably don't understand what I'm looking at. I would like sendFile/sendFileSync - which would abstract over TransferFile on Windows.
[ Parent
| on HN ]
The reason you're unlikely to see that in the node binary is presumably the same reason copyFile has taken so long: node aims to have a small core that enables a rich userspace.
There's gotta be a very good reason to bog down the core with more stuff, since that equals less other stuff and more bugs. Some of the few valid reasons are ubiquity (which HTTP is, but Windows and sending files are not), or things that were impossible before (like no overhead file copy).
>node aims to have a small core that enables a rich userspace
So, dogma?
Because copying a file fits right in any kind of "small core" -- and helps create a more dependable and usable "rich userspace" which doesn't need to reinvent the wheel 200 times for basic stuff.