3 Replies - 3633 Views - Last Post: 05 December 2011 - 11:26 AM

#1 jammmie999  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 117
  • Joined: 01-April 09

POSIX vs win32 api

Posted 05 December 2011 - 10:45 AM

So the POSIX API is implemented in several unix based operating systems and the Win32 API is only implemented in windows based operating systems.

I am not asking which operating system is superior, I am asking which API is better/preferred and why?

For example, the POSIX API may be better as it is compatable with more OS's, but the Win32 API is better documented.

Thanks

This post has been edited by jammmie999: 05 December 2011 - 10:46 AM

Is This A Good Question/Topic? 0
  • +

Replies To: POSIX vs win32 api

#2 lordofduct  Icon User is offline

  • I'm a cheeseburger
  • member icon


Reputation: 2531
  • View blog
  • Posts: 4,631
  • Joined: 24-September 10

Re: POSIX vs win32 api

Posted 05 December 2011 - 11:04 AM

POSIX is for unix, Win32 is for Windows.

What more is there? It's like asking if the Latin alphabet is better than the Cyrillic alphabet... all you're going to get really is the people who use their own most likely preferring their own for the same exact reasons the others like their own.

I mean really what does it mean saying "POSIX works on more OS's"? Yeah, and all those OS's are usually looked at as being the same by most laymen, and even skilled people as well. Furthermore the combined footprint of all those *nix OSes don't even match the single foot print of Windows. Both of which are valid points that don't put one or the other into any greater light than the other, and in the end is just a "which OS is better" discussion; the very thing you thought to preface against.


(though yes, there are POSIX compatible runtimes like Cygwin for using POSIX in Windows... but isn't commonly used by those who run Windows unless they come from Unix/*nix to Windows with a POSIX bias already)

This post has been edited by lordofduct: 05 December 2011 - 11:06 AM

Was This Post Helpful? 0
  • +
  • -

#3 jammmie999  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 117
  • Joined: 01-April 09

Re: POSIX vs win32 api

Posted 05 December 2011 - 11:14 AM

I might be missing something but isn't using a different API just like speaking a totally different language. With each API having its own way of doing things and the support that those API's can provide each API having its own pros and cons.

e.g. POSIX may provide a better way of drawing a window on screen, whilst win API provides better way of rendering 3d objects, and POSIX providing better networking support.

I may be totally off track here, and have totally the wrong idea though.

This post has been edited by jammmie999: 05 December 2011 - 11:15 AM

Was This Post Helpful? 0
  • +
  • -

#4 lordofduct  Icon User is offline

  • I'm a cheeseburger
  • member icon


Reputation: 2531
  • View blog
  • Posts: 4,631
  • Joined: 24-September 10

Re: POSIX vs win32 api

Posted 05 December 2011 - 11:26 AM

POSIX and Win32 is the application programming interface (API), more specifically it is the API to the underlying operating system. An API is an 'interface', its how you communicate with something, not the guts of what that communication is... which yes, it's similar to a language in that respect. A language is the words with which you communicate the idea (programmatically or spoken/written). most well-developed languages tend to allow you to convey similar ideas.

The actual power or strength of the underlying operations, the implementation, that's OS specific (or software/hardware installed with that OS). And actually most POSIX implementations on Windows and even other operating systems are just translations of the POSIX to the native interface. Meaning you only really gain the cross-platformability at the cost of speed to use non-native interfaces on a OS that doesn't natively support your API of choice.

So better rendering 3D objects, or drawing a window on screen, has nothing to do with POSIX or Win32... instead it might have to do with DirectX, OpenGL, X-Windows, whatever windows gui system is being used (I don't know most of their names... Aero is one right?), etc, etc, etc. POSIX or Win32 is really just being the interface through which you access those things. The actual power of it is getting into the OS and/or software installed with the OS.

Now of course a 'language' or interface can be heavily rudimentary and fail to allow for you to do all the things more robust interfaces can do. Think like ancient languages compared to contemporary languages ability to convey thoughts. This is why spoken languages, written languages, and computer languages evolve with time. It's also why interfaces and APIs evolve as well... they change to meet the needs of current times. Both POSIX and Win32 are modern APIs with comparable capabilities so similar in the end that really you probably wouldn't choose one over the other because of the API but instead because of the OS which happens to use that API.

Most developers don't think "I'll use Windows because the Win32 API is so awesome". They probably choose Windows for various other OS related things, and the API is only one tiny check on the list and even if it is a couple marks below POSIX, the OS as a whole may offer so many other things that that person chooses it in the end. (prime proof of this, when's the last time some one dis/en-couraged the use of Windows because of its API and not because of a huge list of other things? Probably never for a good deal of us.)

As for those minor differences... sure, I guess that's discussion worthy. But really, you're talking nuances now... which will be heavily biased by the needs, experiences, and natural biases of different developers, because in the end if one is lacking something the other has in spades and developers by large obsess over it... the opponent adds it to their own.

This post has been edited by lordofduct: 05 December 2011 - 11:38 AM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1