Difference between revisions of "First Steps"

m (Overview)
m (Overview)
Line 7: Line 7:
 
When trying to identify the difficult parts of the Eiffel to C compilation it helps to analyze the differences between the two languages. The most important ones are enlisted here:
 
When trying to identify the difficult parts of the Eiffel to C compilation it helps to analyze the differences between the two languages. The most important ones are enlisted here:
 
*Melting ice technology (only for workbench code), see [[Melting Ice Technology|link]]
 
*Melting ice technology (only for workbench code), see [[Melting Ice Technology|link]]
*Eiffel supports objects, see [[Object Layout|link]]
+
*Eiffel supports objects, see [[Object Layout|link]].
*Eiffel has garbage collection, see [[Interfacing the garbage collector|link]]
+
*Eiffel has garbage collection, see [[Interfacing the garbage collector|link]].
*Eiffel has dynamic binding, see [[Dynamic Binding|link]]
+
*Eiffel has dynamic binding, see [[Dynamic Binding|link]].
*Eiffel supports generics  
+
*Eiffel supports generics.
*Eiffel supports closures, C only supports function pointers, [[Closures|link]]
+
*Eiffel supports closures, C only supports function pointers, see [[Closures|link]].
 
*Eiffel supports design by contract.
 
*Eiffel supports design by contract.
  

Revision as of 13:19, 27 January 2007

Introduction

The source code of EiffelStudio was recently made open in a dual licensing model. This makes it possible for a broad group of developers to both learn from and extend the huge code base that embodies EiffelStudio. This article tries to give a good initial understanding behind the most basic ideas of the EiffelStudio implementation.

Overview

EiffelStudio is first and foremost a compiler that translates programs written in the Eiffel language into different output formats where one of them is C code. To study a translation process it is important to understand both the source and the target language. The former is of course a perquisite.

When trying to identify the difficult parts of the Eiffel to C compilation it helps to analyze the differences between the two languages. The most important ones are enlisted here:

  • Melting ice technology (only for workbench code), see link
  • Eiffel supports objects, see link.
  • Eiffel has garbage collection, see link.
  • Eiffel has dynamic binding, see link.
  • Eiffel supports generics.
  • Eiffel supports closures, C only supports function pointers, see link.
  • Eiffel supports design by contract.

Of course the languages have other differences too, Eiffel has the from loop construct whereas C has the for and while constructs. But this stuff is very easily translated.

For all these features, that the Eiffel languages supports as opposed to the C language runtime mechanisms are needed to support them at the C level.