in reply to diamond operator question

They're not considered the same.

We have the higher-level opendir(3), readdir(3), closedir(3) etc functions in libc exactly because directories are not treated uniformly between UNIX systems.

For example, in Linux systems, you can not actually read directories. You can open them, but if you try to read them, you get EISDIR. The way readdir reads them is the SysV function getdents (and its lfs equivalent, getdents64).