简体   繁体   中英

Parallel interpreted language for a command line tool?

I'm considering developing a command line tool. I'd like the implementation language for this tool to meet the following criteria:

  • Interpreted.
  • Cross-platform (at least Windows, macOS, Linux, BSD) and architecture neutral (runs on x86, ARM, POWER, etc.)
  • Widely deployed (eg available via package manager download on above systems).
  • Offers thread-based concurrency with true parallel execution across multiple cores - no global interpreter lock, etc.
  • Module system that can load user code - extensions to the tool are a required use case.
  • Good abstraction mechanisms (generics, polymorphism, lambdas, etc.)
  • Multi-paradigm: No extreme opinions regarding functional programming, actor model, etc. Users should not need to be programming language experts to write extensions.

Along with the above hard requirements, the following are important nice-to-haves:

  • JIT.
  • Statically typed, with type inference.
  • Standard library with high-quality implementations of standard data structures.
  • Straightforward syntax, especially for declaring data-structure literals.
  • Relatively beginner friendly, for users writing extensions.

I realize that is a lot to ask, and there probably isn't one language that gets me all of that. What gets me closest?

I think this question will soon be closed as a mostly opinion-based question, but still here is my attempt:

Groovy

It is a fully-fledged JVM-based language which already ticks most of the marks in your requirements list and there are groovysh tool and GroovyShell class that kind of add interpreter-like behavior.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM