Loading AI tools
来自维基百科,自由的百科全书
Mercury是为现实世界使用而开发的函数式逻辑编程语言。最初版本是墨尔本大学计算机科学系的Fergus Henderson、Thomas Conway和Zoltan Somogyi在Somogyi监督下完成的,并在1995年4月8日发行。
编程范型 | 逻辑, 函数式, 面向对象 |
---|---|
设计者 | Zoltan Somogyi |
实作者 | 墨尔本大学 |
发行时间 | 1995年4月8日 |
当前版本 |
|
型态系统 | 强类型, 静态, 多态 |
实作语言 | Mercury |
系统平台 | IA-32, x86-64, ARM, Sparc64, Java, CLI, Erlang/OTP |
操作系统 | 跨平台: Unix, Linux, macOS, Solaris, FreeBSD, OpenBSD, Windows, Android |
许可证 | GPL编译器, LGPL标准库 |
文件扩展名 | .m |
网站 | www |
主要实作产品 | |
Melbourne Mercury Compiler | |
启发语言 | |
Prolog, Hope, Haskell |
Mercury是纯声明式逻辑编程语言。它有关于Prolog和Haskell二者[2]。它的特征是有强、静态、多态类型系统,和强的模态(mode)和确定性系统。
官方实现是墨尔本Mercury编译器,可以在多数Unix和类Unix平台上获得到,包括Linux、macOS和Windows。
下面是"Hello World"
:- module hello.
:- interface.
:- import_module io.
:- pred main(io::di, io::uo) is det.
:- implementation.
main(!IO) :-
io.write_string("世界,你好!\n", !IO).
Seamless Wikipedia browsing. On steroids.
Every time you click a link to Wikipedia, Wiktionary or Wikiquote in your browser's search results, it will show the modern Wikiwand interface.
Wikiwand extension is a five stars, simple, with minimum permission required to keep your browsing private, safe and transparent.