Leave Mac out of this discussion. The idea of using the file extension for anything is a more recent development on the Mac and one that was mainly driven by exchanging files with (mostly) the Windows world. On old Mac OS you had "type-codes", in OS X you still have "Uniform Type Identifiers". You cannot magically hide executes the same way you can on Windows.
On top of that "even" (or rather especially) in the most recent OS X version(s), by default you could not run anything unless the program was actually signed, approved and the certificate and app hadn't been revoked.