基于JVM平台的静态类型语言 Mirah

码农软件 · 软件分类 · Java开发工具 · 2019-11-07 19:58:50
  • 授权协议: 未知
  • 开发语言: Java Ruby
  • 操作系统: 跨平台
  • 软件首页: http://www.mirah.org/

软件介绍

Mirah,又叫做Duby,又一个基于JVM平台的静态类型语言,它拥有Ruby一样的语法的同时,且拥有Java般的速度。他是由JRuby衍生出来的项目,旨在让Ruby能更进一步的沁入JVM平台。

Mirah(Duby)的特性:

  • Ruby的语法
  • 可编译为.class或.java
  • 拥有Java般的速度

代码示例1:

import java.util.Collections
import java.util.ArrayList

list = ArrayList.new [9,5,2,6,8,5,0,3,6,1,8,3,6,4,7,5,0,8,5,6,7,2,3]
puts "unsorted: #{list}"
Collections.sort(list) {|a,b| Integer(a).compareTo(b)}
puts "sorted: #{list}"

代码示例2:

import "java.lang.System"

def foo
  home = System.getProperty "java.home"
  System.setProperty "hello.world", "something"
  hello = System.getProperty "hello.world"

  puts home
  puts hello
end

puts "Hello world!"
foo

 

Mirah的设计原则:

  • 平台无关
  • 摆脱对后端类型系统的具体决定
  • 代码生成,或其他细节由外部语言确定
  • 没有运行时的依赖库

 

本文地址:https://codercto.com/soft/d/18492.html

Effective Modern C++

Effective Modern C++

Scott Meyers / O'Reilly Media / 2014-12 / USD 49.99

Learn how to program expertly with C++ with this practical book from Scott Meyers, one of the world's foremost authorities on this systems programming language. Scott Meyers takes some of the most dif......一起来看看 《Effective Modern C++》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

在线进制转换器
在线进制转换器

各进制数互转换器

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具