Download presentation
Presentation is loading. Please wait.
1
Languages for.NET: Eiffel Raphael Simon (ISE) Emmanuel Stapf (ISE)
2
Introduction Initially (PDC 2000, ISE Eiffel 5.0): support for Eiffel subset Planned for 2002: full Eiffel implementation Integrated with the ISE Eiffel environment
3
Today: Eiffel Used in financial institutions: Chicago Board of Trade Chicago Board of Trade Axa Axa CALFP CALFP Used for simulation: Battle field simulation (XonTech Inc) Battle field simulation (XonTech Inc) Atmosphere simulation (EPA) Atmosphere simulation (EPA) Payroll systems: Groupe S Groupe S CAP Gemini (now Ernst&Young) CAP Gemini (now Ernst&Young)
4
Today: Eiffel for.NET Eiffel for.NET includes: Major Eiffel language mechanisms Major Eiffel language mechanisms Contracts (assertions) Contracts (assertions) Exception handling Exception handling Genericity Genericity Covariance Covariance Does not include: Agents (closures, cf. Delegates) Agents (closures, cf. Delegates) Multiple inheritance Multiple inheritance Generic conformance Generic conformance
5
Eiffel libraries EiffelBase compatible version for.NET Uses interfaces to represent multiple inheritance used in EiffelBase Uses interfaces to represent multiple inheritance used in EiffelBase 100% compatible with EiffelBase at the client level 100% compatible with EiffelBase at the client level Uses natively.NET libraries (imported through the Assembly Manager)
6
.NET special additions to Eiffel Extended indexing clauses to represent: External names: names as they will be seen by the.NET world External names: names as they will be seen by the.NET world Custom attributes Custom attributes New class qualification to represent: Sealed classes Sealed classes.NET classes (imported from an assembly).NET classes (imported from an assembly)
7
Indexing clauses: classes indexing external_name: "System.String" attribute: create {OBSOLETE_ATTRIBUTE}.make ("Use YY instead") end frozen external class MY_CLASS …
8
Indexing clauses: routines feature some_routine (i: INTEGER) is indexing external_name: "SomeRoutine" attribute: create {OBSOLETE_ATTRIBUTE}.make ("Use SomeOtherRoutine instead") end do … end
9
Old Eiffel class qualification [expanded | deferred] class Simplified syntax: An example: indexing description: "Sequence of characters" class STRING
10
New Eiffel class qualification Indexing description: "Sequence of characters" external_name: "System.String" frozen external class STRING [[frozen] [expanded] | deferred] [external] class Simplified syntax: An example:
11
Accessing.NET facilities Creation of the assembly manager to automatically generate Eiffel class skeleton to access.NET facilities New Eiffel external syntax to access.NET members. to_string: STRING is external "IL signature ():System.String use System.String" alias "ToString" end
12
Accessing.NET facilities Properties: Assembly Manager will generate the get_xx and set_xx features associated to the `xx' property. Events: same as properties, we generate the add_xx, remove_xx and fire_xx features. Overloaded methods: Assembly Manager will generate a different name visible at the Eiffel level kept consistently by the Assembly Manager.
13
Eiffel: a first class CLS citizen CLS: Common Language Specification Language interoperability achieved through a set of CLS rules .NET library authors should know about CLS Consumers and producers targeting.NET should know about CLS
14
Eiffel constructs seen from CLS Attributes are generated as properties Generic classes: one.NET class per generic derivation of expanded types and one.NET class for all generic derivation of reference types. LIST [INTEGER]->LIST_System_Int32 LIST [CHARACTER]->LIST_System_Char LIST [ANY]->LIST_System_Object
15
CLS issues Eiffel creation routines do not match CLI constructors: Two creation routines might have the same signature Two creation routines might have the same signature Creation routine need not call the parent creation routine Creation routine need not call the parent creation routine Hard to consume `byref' parameter Eiffel features exportation rules are different of the CLI ones.
16
Eiffel issues Multiple inheritance of classes is not yet supported. Many possible ways: Implementation of your own dynamic dispatch. Barely usable for other CLS languages. Implementation of your own dynamic dispatch. Barely usable for other CLS languages. Promote all multiply inherited classes to interfaces. Performance penalty and behavior differences. Promote all multiply inherited classes to interfaces. Performance penalty and behavior differences.
17
Multiple inheritance through interfaces Inconvenience of using the interface definition instead of the class directly. Performance penalty: every call is virtual instead of being optimized every call is virtual instead of being optimized inlining becomes difficult inlining becomes difficult
18
Multiple inheritance through interfaces Behavior of repeated inheritance is not identical: A C B D f g h select g c: C; d: D c := d c.h ?? In Eiffel: version g of D (inherited from B) is called In.NET: version h of D (inherited from C) is called
19
Verifiability Default generation is verifiable User can specify otherwise: For better performance For better performance For private usage For private usage
20
Eiffel for.NET future addition Creation of.NET properties Creation of.NET events Creation of new type of Delegates
21
Eiffel and Eiffel for.NET Calling Eiffel from Eiffel for.NET: Creating COM components of existing Eiffel application Creating COM components of existing Eiffel application Direct calls to Eiffel C generated code automatically handled by the Eiffel for.NET compiler Direct calls to Eiffel C generated code automatically handled by the Eiffel for.NET compiler Calling Eiffel for.NET from Eiffel: Using COM interop Using COM interop
22
.NET Wizard Helps start a new Eiffel for.NET project Integrated into EiffelStudio
23
Assembly Manager Available at any time from EiffelStudio Allows to: Edit external classes feature names Edit external classes feature names Import new assemblies in the Eiffel Assembly Cache (EAC) Import new assemblies in the Eiffel Assembly Cache (EAC) Remove assemblies from the EAC Remove assemblies from the EAC
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.