Eiffel
维基百科,自由的百科全书
Eiffel是一套物件導向程式語言, 1985年由Bertrand Meyer所發明。文法類似Pascal,並且將語言本身與軟體工程、和工具結合為一。Eiffel实现契约式设计(Design by Contract)的風格。
目录 |
語法與語意 [编辑]
整體架構 [编辑]
一個 Eiffel "system" 或 "program" 是指一個 classes 的集合。Eiffel系统有一个Cluster的概念。通过一个叫做ACE的外部组件描述类之间的组合关系的,Cluster可以是几个类,或者几个子Cluster,或者是它们的混合。但是Cluster不是Eiffel语言的一个概念,Eiffel语言中,CLASS是惟一的模块。
"Hello, world!" [编辑]
一支程式語言都會有 "Hello, world!" 的程式碼. 以Eiffel 的表示如下:
class HELLO_WORLD create make feature make do print ("Hello, world!%N") end end
這支程式有類別 (class) HELLO_WORLD. 其建構元 (create routine) 名稱是 make, 會呼叫 print 的系統函式程序(system library routine)將 "Hello, world!" 的訊息給輸出。 Eiffel中不像C系列【C、C++、Java、C#】的语言,通过约定某个叫做main的函数来启动应用,而是通过ACE来指定一个类作为整个应用的启动。这个类的构造函数也就成为应用的起始点。
外部連結 [编辑]
- Basic Eiffel Language Mechanisms, Bertrand Meyer, August 2006.
- Eiffel Software's Open Source initiative
- Eiffel Software web site of the company that introduced Eiffel, was Interactive Software Engineering (ISE).
- Eiffel tutorial (100 pages) by Bertrand Meyer (HTML, PDF)
- Eiffel standard, revision 2 (2006); this is the ECMA standard, with free access, its text identical to that of the ISO standard.
- 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.
- "The Eiffel Compiler" (tecomp) an open source Eiffel compiler with documentation.
- Visual Eiffel an open source implementation of Eiffel creating native code for X86 systems (Windows, Linux)
- NICE Nonprofit International Consortium for Eiffel.
- eiffelroom.com Community around standard Eiffel.
- eiffelzone.com Includes a comprehensive Eiffel Software Directory
- Cetus Eiffel Page
- Eiffel for .NET
- Eiffel: the Language subset
|
||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||