logoalt Hacker News

pseudohadamardlast Sunday at 10:31 AM7 repliesview on HN

For people not familiar with Windows development, another name for the NT native API is "the API that pretty much every document on Windows programming tells you not to use". It's like coding to the Linux syscall interface instead of libc.


Replies

HexDecOctBintoday at 5:19 PM

Linux syscall interface is actually stable and can easily be targeted. It’s BSDs (and Mac OS) that force everyone to link to only libc.

show 1 reply
kvemkontoday at 5:19 PM

> It's like ...

Considering the level of the API. But it is total opposite comparing a bit deeper. Linux has a famous rule "WE DO NOT BREAK USERSPACE!" e.g. [1].

[1] https://news.ycombinator.com/item?id=44611692

show 1 reply
samustoday at 6:45 PM

With the crucial difference that Linux places high value on syscall interface binary compatibility, while the NT native API is not guaranteed to be stable in any way.

A bit more comparable is OpenBSD where applications are very much expected to only use libc wrappers, which threw a wrench into the works for the Go runtime.

epstoday at 6:13 PM

"Every document" notwithstanding, Native API is very widely used in practice and generally considered stable.

If in doubt, try and find examples of its breakage, semantic changes, etc.

nullpoint420today at 4:56 PM

Yeah, I know go has had issues because they subvert libc themselves in similar fashion. I wonder how this will turn out.

show 3 replies
pjmlptoday at 5:38 PM

Except unlike Linux syscall interface and like almost every other OS out there, ABI compatibility is an accident, not a guarantee.

koakuma-chantoday at 5:21 PM

> It's like coding to the Linux syscall interface instead of libc.

The right thing to do? I don't see why I would want to use libc.

show 3 replies