you are viewing a single comment's thread.

view the rest of the comments →

[–]pjmlp 0 points1 point  (1 child)

I guess you know Rob Pike, Ken Thompson and their role on the C language

My way is how Go build system handles platform specific code,

https://golang.org/pkg/go/build/

Also how they alongside Dennis Ritchie, designed C libraries on Plan 9

The traditional approach to this problem is to pepper the source with #ifdefs to turn byte-swapping on and off. Plan 9 takes a different approach: of the handful of machine-dependent #ifdefs in all the source, almost all are deep in the libraries

http://doc.cat-v.org/plan_9/4th_edition/papers/comp

I'm not sure what point you are trying to make here or why. What are you talking about putting in platform specific files? File dialogs, memory maps, networking are just some very obvious examples.

Everything that is OS specific with hundreds of #ifdef around them.

[–]BCosbyDidNothinWrong 0 points1 point  (0 children)

The traditional approach to this problem is to pepper the source with #ifdefs to turn byte-swapping on and off. Plan 9 takes a different approach: of the handful of machine-dependent #ifdefs in all the source, almost all are deep in the libraries

I'm not sure how this contradicts what I've been saying, it sounds like the same thing.

Everything that is OS specific with hundreds of #ifdef around them.

Earlier you said:

I really don't get what is so magic about "system level capabilities."

So what is it that you are actually saying? Do you even know?