Post AKzJ6MtUECiPLDFJmS by j3rn@fosstodon.org
(DIR) More posts by j3rn@fosstodon.org
(DIR) Post #AKzBxarWE3dwNTC7Q8 by kzimmermann@fosstodon.org
2022-06-29T16:16:09Z
0 likes, 0 repeats
Which of the following is the most portable in the Unix / Unix-like world?
(DIR) Post #AKzI3QQCYX6xSWa5BY by IslandUsurper@fosstodon.org
2022-06-29T17:24:27Z
0 likes, 0 repeats
@kzimmermann the trick is knowing how to make such things portable. sh is easiest because it requires the least knowledge and setup. C is a small step less portable because not every computer supports everything you can do on every platform. Python, though, is far less portable because you need to make sure your code works on a lot of different Python versions, none of which work everywhere (like embedded systems). And then there are dependent libraries if you use them.
(DIR) Post #AKzJ6MtUECiPLDFJmS by j3rn@fosstodon.org
2022-06-29T17:36:12Z
0 likes, 0 repeats
@kzimmermann I voted for C as /bin/sh is actually different shells on different systems (dash on Debian, bash on Fedora, etc) though you _should_ only be using POSIX features in an sh script.With Python there's differences in what Python version is available (if at all). Could be as different as Python 2 and Python 3. With C your big concerns are architecture differences and perhaps some syscall differences, but these are less likely to be encountered as compared to the previous two.
(DIR) Post #AKzLejZScbyTQWOTHk by cstanhope@social.coop
2022-06-29T18:04:48Z
0 likes, 0 repeats
@kzimmermann Depends on the nature of the program. I have discovered portability pain points with all those. :/