Difference between revisions of "Externals"
(prefer plug_in over java) |
Hzwakenberg (talk | contribs) m |
||
(11 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | [[Category: |
+ | [[Category: Interfacing]] |
+ | See "External Types". |
||
− | ''Externals'' build on top of a standard Eiffel |
+ | ''Externals'' build on top of a standard Eiffel mechanism. This mechanism permits calling code in a language different from Eiffel. |
− | You will find below the current list of ''external'' specifications supported by |
+ | You will find below the current list of ''external'' specifications supported by Liberty. |
== external "C" == |
== external "C" == |
||
− | This specification permits calling C code from Eiffel. This |
+ | This specification permits calling C code from Eiffel. This mechanism is described in [[Bibliography#ETL_1992|''Eiffel: The Language'']]. |
Some examples are available in the tutorial, <TT>tutorial/external/C</TT>. |
Some examples are available in the tutorial, <TT>tutorial/external/C</TT>. |
||
− | This |
+ | This mechanism is only available with [[compile_to_c]]. |
− | This mechanism has since been supplanted with plugins (see below). |
+ | This mechanism has since been supplanted with [[plugins]] (see below). |
== external "C++" == |
== external "C++" == |
||
Line 23: | Line 24: | ||
This mechanism is only available with [[compile_to_c]]. |
This mechanism is only available with [[compile_to_c]]. |
||
− | This mechanism has since been supplanted with plugins (see below). |
+ | This mechanism has since been supplanted with [[plugins]] (see below). |
− | |||
− | == external "Java" == |
||
− | |||
− | This specification permits calling Java code from Eiffel. |
||
− | |||
− | Some examples are available in the tutorial, <TT>tutorial/external/Java</TT>. |
||
− | |||
− | This mechanism is only available with [[compile_to_jvm]]. |
||
− | |||
− | This mechanism has since been supplanted with plugins (see below). |
||
== external "plug_in" == |
== external "plug_in" == |
||
− | This specification is particularly utilized |
+ | This specification is particularly utilized by the Liberty standard libraries. This form is preferred to ''external "C"'' and ''external "Java"''. |
Examples are available throughout the standard library. |
Examples are available throughout the standard library. |
||
Line 45: | Line 36: | ||
== external "built_in" == |
== external "built_in" == |
||
− | This specification is reserved for the |
+ | This specification is reserved for the compiler and its base libraries. It is not usable outside of very specific cases, unique to [[compile_to_c]] and [[compile_to_jvm]]. These cases are the "building blocks" that produce specialized output code depending on the code generator being used. |
For example, <TT>infix "#+"</TT> in the class [[library_class:INTEGER|<TT>INTEGER</TT>]] is directly translated in C by a <TT>+</TT>, and in Java by the <TT>iadd</TT> bytecode. |
For example, <TT>infix "#+"</TT> in the class [[library_class:INTEGER|<TT>INTEGER</TT>]] is directly translated in C by a <TT>+</TT>, and in Java by the <TT>iadd</TT> bytecode. |
||
+ | |||
+ | == external types == |
||
+ | |||
+ | A mechanism for embedding [[external types]] from the underlying language is being designed for a future release. |
||
+ | |||
+ | == external "Java" - currently not supported == |
||
+ | |||
+ | This specification would permit calling Java code from Eiffel. Some examples used to be available in the tutorial, <TT>tutorial/external/Java</TT>. This mechanism would only be available with [[compile_to_jvm]], which currently is not supported. |
||
+ | |||
+ | This mechanism has since been supplanted with [[plugins]] (see below). |
Latest revision as of 12:35, 30 July 2024
See "External Types".
Externals build on top of a standard Eiffel mechanism. This mechanism permits calling code in a language different from Eiffel.
You will find below the current list of external specifications supported by Liberty.
external "C"
This specification permits calling C code from Eiffel. This mechanism is described in Eiffel: The Language.
Some examples are available in the tutorial, tutorial/external/C.
This mechanism is only available with compile_to_c.
This mechanism has since been supplanted with plugins (see below).
external "C++"
This specification permits calling C++ code from Eiffel. This mechanism is described in Eiffel: The Language.
Some examples are available in the tutorial, tutorial/external/C++.
This mechanism is only available with compile_to_c.
This mechanism has since been supplanted with plugins (see below).
external "plug_in"
This specification is particularly utilized by the Liberty standard libraries. This form is preferred to external "C" and external "Java".
Examples are available throughout the standard library.
A dedicated page is devoted to this functionality.
external "built_in"
This specification is reserved for the compiler and its base libraries. It is not usable outside of very specific cases, unique to compile_to_c and compile_to_jvm. These cases are the "building blocks" that produce specialized output code depending on the code generator being used.
For example, infix "#+" in the class INTEGER is directly translated in C by a +, and in Java by the iadd bytecode.
external types
A mechanism for embedding external types from the underlying language is being designed for a future release.
external "Java" - currently not supported
This specification would permit calling Java code from Eiffel. Some examples used to be available in the tutorial, tutorial/external/Java. This mechanism would only be available with compile_to_jvm, which currently is not supported.
This mechanism has since been supplanted with plugins (see below).