Initiative to replace "Eiffel language" and similar with "Eiffel programming language"

Author:halw
Date:2012-08-20T14:15:54.000000Z


git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@1141 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
halw
2012-08-20 14:15:54 +00:00
parent d62691b6db
commit 13a83ba27e

View File

@@ -6,7 +6,7 @@ Eiffel handles inheritance in a different way than most languages. In C# or VB.N
As a result, Eiffel for ASP.NET introduces '''inheritance snippets'''. Each Eiffel ASP.NET page may include at most one inheritance snippet. Such a snippet must start with the '''inherit''' keyword and may then list any valid Eiffel feature adaptation. As a result, Eiffel for ASP.NET introduces '''inheritance snippets'''. Each Eiffel ASP.NET page may include at most one inheritance snippet. Such a snippet must start with the '''inherit''' keyword and may then list any valid Eiffel feature adaptation.
==String and Array Manifest Constants== ==String and Array Manifest Constants==
The Eiffel language supports using '''manifest constants''' in source code. The type of these constants is inferred by the Eiffel compiler. There are two manifest constant types that require special attention on .NET: string and array. Because the Eiffel and the .NET types differ, writing code using string or array manifest constants requires additional care. The Eiffel programming language supports using '''manifest constants''' in source code. The type of these constants is inferred by the Eiffel compiler. There are two manifest constant types that require special attention on .NET: string and array. Because the Eiffel and the .NET types differ, writing code using string or array manifest constants requires additional care.
* '''Strings''': Eiffel strings cannot be mapped directly to .NET strings because Eiffel strings are ''mutable'': an Eiffel string can be resized while the size of a .NET string is set for the lifetime of the object. However, the Eiffel class <eiffel>STRING</eiffel> defines conversion features that will automatically convert to and from a .NET string. So when the compiler expects an object of type ''System.String'' where an object of type <eiffel>STRING</eiffel> is used, it will automatically call the right conversion routine.<br/> * '''Strings''': Eiffel strings cannot be mapped directly to .NET strings because Eiffel strings are ''mutable'': an Eiffel string can be resized while the size of a .NET string is set for the lifetime of the object. However, the Eiffel class <eiffel>STRING</eiffel> defines conversion features that will automatically convert to and from a .NET string. So when the compiler expects an object of type ''System.String'' where an object of type <eiffel>STRING</eiffel> is used, it will automatically call the right conversion routine.<br/>
However if an instance of <eiffel>STRING</eiffel> is passed as an argument to an overloaded .NET function that can accept both an instance of ''System.Object'' or an instance of ''System.String'' then the compiler will produce an error since it has no means to know which type the Eiffel object should be converted to (any Eiffel object converts to ''System.Object''). When this happens, the conversion function <eiffel>to_cil</eiffel> must be explicitely called. However if an instance of <eiffel>STRING</eiffel> is passed as an argument to an overloaded .NET function that can accept both an instance of ''System.Object'' or an instance of ''System.String'' then the compiler will produce an error since it has no means to know which type the Eiffel object should be converted to (any Eiffel object converts to ''System.Object''). When this happens, the conversion function <eiffel>to_cil</eiffel> must be explicitely called.
* '''Arrays''': The exact same problem also arises with arrrays. Instances of the Eiffel class <eiffel>ARRAY</eiffel> are different from instances of <eiffel>NATIVE_ARRAY</eiffel> which correspond to the .NET array type. There are however features in <eiffel>ARRAY</eiffel> that will convert to and from .NET arrays. If an overloaded .NET function can take an argument of type ''System.Object'' or ''System.Array'', any instance of <eiffel>ARRAY</eiffel> given to it must first be converted explicitly to a .NET array by calling the <eiffel>to_cil</eiffel> function. * '''Arrays''': The exact same problem also arises with arrrays. Instances of the Eiffel class <eiffel>ARRAY</eiffel> are different from instances of <eiffel>NATIVE_ARRAY</eiffel> which correspond to the .NET array type. There are however features in <eiffel>ARRAY</eiffel> that will convert to and from .NET arrays. If an overloaded .NET function can take an argument of type ''System.Object'' or ''System.Array'', any instance of <eiffel>ARRAY</eiffel> given to it must first be converted explicitly to a .NET array by calling the <eiffel>to_cil</eiffel> function.