Hacker News new | ask | show | jobs
by TeMPOraL 726 days ago
`ls` is faster and more portable in Unix-land, fallback to emulation on non-Unix platforms is easier than asking users to install a port of half of Unix just to have `ls`, and user customization points are what Emacs is made of and for in the first place.
1 comments

Shelling out to `ls` (exec + opendir + readdir + stat + pipe IO) is not faster than opendir + readdir + stat. `ls --dired` is definitely not portable. readdir and stat (the libc functions) are portable, work across POSIX and other Unix-likes. And the customization point here doesn’t provide any benefit for the user, it serves to let the user shoulder the responsibility for its own design defect (has to guess whether the `ls` supports --dired or not).