简体   繁体   English

命令行工具的并行解释语言?

[英]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.)跨平台(至少是 Windows、macOS、Linux、BSD)和架构中立(在 x86、ARM、POWER 等上运行)
  • 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.)良好的抽象机制(泛型、多态、lambdas 等)
  • Multi-paradigm: No extreme opinions regarding functional programming, actor model, etc. Users should not need to be programming language experts to write extensions.多范式:对于函数式编程、actor 模型等没有极端的意见。用户不需要成为编程语言专家来编写扩展。

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.它是一种成熟的基于 JVM 的语言,它已经满足了您的需求列表中的大部分要求,并且有groovysh 工具GroovyShell类可以添加类似解释器的行为。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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