Eiffel是一套物件導向程式語言,1985年由伯特蘭·邁耶所發明。文法類似Pascal ,並且將語言本身與軟體工程、和工具結合為一。Eiffel实现契约式设计(Design by Contract)的風格。
語法與語義
整體架構
一個Eiffel“系统”或“程序”是指一個“类”的集合。Eiffel系统有一个Cluster的概念。通过一个叫做ACE的外部组件描述类之间的组合关系的,Cluster可以是几个类,或者几个子Cluster,或者是它们的混合。但是Cluster不是Eiffel的,Eiffel语言中,类是惟一的构造模块。
"Hello, world!"
一支程式語言都會有"Hello, world!"的程式碼。以Eiffel的表示如下:
class
HELLO_WORLD
create
make
feature
make
do
print("Hello, world!%N")
end
end
這支程式有类HELLO_WORLD。其建構例程的名稱是make,它會呼叫print系統函式库例程將"Hello, world!"的訊息給輸出。
Eiffel中不像C系列(C、C++、Java、C#)的语言,通过约定某个叫做main的函数来启动应用,而是通过ACE来指定一个类作为整个应用的启动。这个类的构造函数也就成为应用的起始点。
引用
外部連結
- [http://se.ethz.ch/~meyer/publications/online/eiffel/basic.html Basic Eiffel Language Mechanisms], [http://se.ethz.ch/~meyer/ Bertrand Meyer], August 2006.
- [http://dev.eiffel.com Eiffel Software's Open Source initiative]
- [http://www.eiffel.com/ Eiffel Software] web site of the company that introduced Eiffel, was Interactive Software Engineering (ISE).
- Eiffel tutorial (100 pages) by Bertrand Meyer([http://archive.eiffel.com/doc/online/eiffel50/intro/language/tutorial-00.html HTML], [http://www.eiffel.com/doc/online/eiffel50/intro/language/tutorial.pdf PDF])
- [http://www.ecma-international.org/publications/standards/Ecma-367.htm Eiffel standard], revision 2 (2006); this is the ECMA standard, with free access, its text identical to that of the ISO standard.
- [http://smarteiffel.loria.fr/ SmartEiffel] (formerly SmallEiffel) a complete Eiffel compiler released under GNU GPL license, translates Eiffel code either to C or Java bytecode, not standard compliant, with emphasis on performance.
- [http://www.sourceforge.net/projects/tecomp "The Eiffel Compiler" (tecomp)] an open source Eiffel compiler with [http://tecomp.sourceforge.net documentation].
- [https://web.archive.org/web/20190719030630/http://visual-eiffel.org/ Visual Eiffel] an open source implementation of Eiffel creating native code for X86 systems(Windows, Linux)
- [http://www.eiffel-nice.org/ NICE] Nonprofit International Consortium for Eiffel.
- [http://www.eiffelroom.com/ eiffelroom.com] Community around standard Eiffel.
- [https://web.archive.org/web/20041129095939/http://eiffelzone.com/ eiffelzone.com] Includes a comprehensive Eiffel Software Directory
- [https://web.archive.org/web/20040604193933/http://cetus-links.org/oo_eiffel.html Cetus Eiffel Page]
- [https://web.archive.org/web/20060414005314/http://www.eiffel.com/products/envsn/ Eiffel for .NET]
- [http://archive.eiffel.com/nice/language/ Eiffel: the Language] subset
评论 (0)