-3

What is the best programming language/compiler for small single-file command-line utilities that will run under Windows, MacOS, and Linux (possibly differently compiled)?

I know C or C++ can do these well, but is there anything more modern?

  • You want to write small utilities right? – Nicolas Raoul Jul 13 '16 at 3:21
  • Do you need compile-once-run-everywhere? Or are you OK with compiling on each target platform? – Nicolas Raoul Jul 13 '16 at 3:22
  • Need open source? Have a budget? – Nicolas Raoul Jul 13 '16 at 3:22
1

Personally I would say python:

  • Free, Gratis & Open Source
  • Cross Platform - the same code will generally run anywhere from RaspberryPi, through OS-X, Win, Linux up to Super Computer Clusters.
  • Small
  • Powerful
  • Easy to learn
  • Functional Programming, OOP, etc.
| improve this answer | |
  • I like Python very much, but it can't write small programs since the user has to either install Python or use an executable with Python integrated which is much larger. Python with full native compilation would be perfect though. – Mark Green Jul 16 '16 at 16:32
  • @MarkGreen - if the user is running windows then you will need to use py2exe or pyinstaller but it is amazing how small such programs often are and if you are creating a number of such utilities the one_dir option works really well. – Steve Barnes Jul 17 '16 at 5:00

Not the answer you're looking for? Browse other questions tagged or ask your own question.