Loading ...
Sorry, an error occurred while loading the content.

Re: From C to Eiffel code?

Expand Messages
  • Le Legionnaire
    Many thanks for the clear explanation Peter. As I understand it to write the same program in Eiffel and compiled in C, and then compiled into an executable
    Message 1 of 9 , Nov 1, 2011
    View Source
    • 0 Attachment
      Many thanks for the clear explanation Peter.

      As I understand it to write the same program in Eiffel and compiled in C, and then compiled into an executable file will be faster than creating the same program in pure C? This is the advantage of language Eiffel?
      I have so many questions because I do not find much information on the network by Eiffel. I started to learn the Java language itself, but in many training courses and the material is not academically, but I did not want to learn simple phrases like a parrot. I want to understand what I'm doing. Or do nothing at all ...
      But in Java and C have a lot of information online and answer session.

      Thanks for your help!

      --- In eiffel_software@yahoogroups.com, Peter Gummer <p-gummer@...> wrote:
      >
      > Le Legionnaire wrote:
      >
      > > I have a question newbie: how can development be faster if you waste time compiling code from Eiffel code to C and then still have to compile the code C? Double work as it turns out!
      >
      > Yes, C compilation is slow, but that doesn't matter because you compile to C only to freeze or finalise a system. You don't do that very often. Most of the time, when developing a system, you compile to an intermediate byte-code format, which is extremely quick. When you have finished testing your work, or when you're ready to go away for a break, you freeze or finalise it, and it's finished by the time you are ready to continue working on it.
      >
      > - Peter Gummer
      >
    • Markus Pilman
      Hello Valerii, I think you are mixing different things up here. From a programmer perspective, it makes a lot of sense to make a differentiation between Eiffel
      Message 2 of 9 , Nov 1, 2011
      View Source
      • 0 Attachment
        Hello Valerii,

        I think you are mixing different things up here. From a programmer
        perspective, it makes a lot of sense to make a differentiation between
        Eiffel the programming language (as defined in the ECMA standard 367 which
        can be found here:
        http://www.ecma-international.org/publications/standards/Ecma-367.htm) and
        EiffelStudio, which is one of its implementations (there are several
        others, like Visual Eiffel, thecomp, SmartEiffel etc - but EiffelStudio is
        the most complete one).
        The standard does not say anything, how an Eiffel program must be compiled.
        It also does not say anything about whether it should be compiled to native
        code, to byte code or to another language. This approaches would be
        possible:
        - Compile to .NET (CIL) - this can be done with EiffelStudio on Windows
        - Compile to C (EiffelStudio and AFAIK SmartEiffel do that)
        - Compile to Java byte code (SmartEiffel can do that)
        - Compile to LLVM byte code (IMHO no implementation does that, but you
        could use gcc-llvm to compile EiffelStudio generated C code to LLVM)
        - Compiler to JavaScript for example with emscripten (Eiffel to C -> C to
        LLVM byte code -> LLVM byte code to JavaScript)
        In theory you can even prove, that every programming language can be
        compiled to any other programming language.

        So if you program in Eiffel, you should not care about how your code gets
        compiled into something that you can execute. You will start to worry about
        it as soon as you want to access for example existing C libraries from
        Eiffel code or if you want to run your Eiffel program on an infrastructure
        which has some restrictions. But this will for sure not be the case while
        learning the language (and this is as far as I understood what you want to
        do at the moment).

        About documentation material: you are right, there is not so much
        information about Eiffel online which is about Java, C, or C++. Frankly in
        my opinion Eiffels documentation is one reason, why it is not that popular
        (Javas documentation was way better than the one of Eiffel when Java was
        newly released). But there is still enough material and this mailing list
        is in my opinion extremely helpful (don't write bug reports directly to
        EiffelSoftware but post them here -> I once wrote a bug report to Eiffel
        Software and never saw a reaction). Most of my time I am programming C++
        and in my experience it is easier to get help on the eiffel mailing list
        than on C++ mailing lists and forums (and the community is much nicer).
        Also it probably would be a good idea to by Bertrand Meyers book A touch of
        class. It is very well written (as most stuff which comes from him) and is
        an excellent introduction to object oriented programming in general and
        Eiffel programming specifically. Even in the Java world you imho won't be
        able to find a book which explains OO as well as this book.
        Also Object-oriented Software Construction (also by Bertrand Meyer) is a
        good investment, it is one of the best (if not the best) book about object
        oriented programming (but less an introduction to Eiffel and OO than Touch
        of class). After you know Eiffel, the ECMA standard is often a good
        reference.

        In general I compliment to the decision of learning Eiffel. My first
        programming language was Java and I even worked as a programmer before my
        studies, but only after learning Eiffel I understood object oriented
        programming fully. IMHO Eiffel, Haskell and C are the programming languages
        a good computer scientist should learn (and if you know these three,
        learning any other language is a piece of cake - although you won't be as
        amazed about "fancy" and hyped programming languages like Python or
        JavaScript than you would be without that knowledge).

        Hope this helps a bit. Best

        Markus

        On Tue, Nov 1, 2011 at 9:51 AM, Le Legionnaire <le.legioner@...>wrote:

        > **
        >
        >
        > Many thanks for the clear explanation Peter.
        >
        > As I understand it to write the same program in Eiffel and compiled in C,
        > and then compiled into an executable file will be faster than creating the
        > same program in pure C? This is the advantage of language Eiffel?
        > I have so many questions because I do not find much information on the
        > network by Eiffel. I started to learn the Java language itself, but in many
        > training courses and the material is not academically, but I did not want
        > to learn simple phrases like a parrot. I want to understand what I'm doing.
        > Or do nothing at all ...
        > But in Java and C have a lot of information online and answer session.
        >
        > Thanks for your help!
        >
        >
        > --- In eiffel_software@yahoogroups.com, Peter Gummer <p-gummer@...> wrote:
        > >
        > > Le Legionnaire wrote:
        > >
        > > > I have a question newbie: how can development be faster if you waste
        > time compiling code from Eiffel code to C and then still have to compile
        > the code C? Double work as it turns out!
        > >
        > > Yes, C compilation is slow, but that doesn't matter because you compile
        > to C only to freeze or finalise a system. You don't do that very often.
        > Most of the time, when developing a system, you compile to an intermediate
        > byte-code format, which is extremely quick. When you have finished testing
        > your work, or when you're ready to go away for a break, you freeze or
        > finalise it, and it's finished by the time you are ready to continue
        > working on it.
        > >
        > > - Peter Gummer
        > >
        >
        >
        >


        [Non-text portions of this message have been removed]
      • Le Legionnaire
        Hallo Markus! Thank you for such a thorough explanation! You do a great deal to open his eyes, but most importantly, what I now climb to where I still do not
        Message 3 of 9 , Nov 1, 2011
        View Source
        • 0 Attachment
          Hallo Markus!

          Thank you for such a thorough explanation!

          You do a great deal to open his eyes, but most importantly, what I now climb to where I still do not have to climb.

          Thanks for the advice of TOUCH OF CLASS. I'm in this book and began to teach Eiffel. I found good courses based on this book and well translated into Russian.
          Unfortunately, my England is much weaker than my German, so I am learning basics Eiffel in his native Russian.

          Sincerely,
          Valerii.

          --- In eiffel_software@yahoogroups.com, Markus Pilman <markus@...> wrote:
          >
          > Hello Valerii,
          >
          > I think you are mixing different things up here. From a programmer
          > perspective, it makes a lot of sense to make a differentiation between
          > Eiffel the programming language (as defined in the ECMA standard 367 which
          > can be found here:
          > http://www.ecma-international.org/publications/standards/Ecma-367.htm) and
          > EiffelStudio, which is one of its implementations (there are several
          > others, like Visual Eiffel, thecomp, SmartEiffel etc - but EiffelStudio is
          > the most complete one).
          > The standard does not say anything, how an Eiffel program must be compiled.
          > It also does not say anything about whether it should be compiled to native
          > code, to byte code or to another language. This approaches would be
          > possible:
          > - Compile to .NET (CIL) - this can be done with EiffelStudio on Windows
          > - Compile to C (EiffelStudio and AFAIK SmartEiffel do that)
          > - Compile to Java byte code (SmartEiffel can do that)
          > - Compile to LLVM byte code (IMHO no implementation does that, but you
          > could use gcc-llvm to compile EiffelStudio generated C code to LLVM)
          > - Compiler to JavaScript for example with emscripten (Eiffel to C -> C to
          > LLVM byte code -> LLVM byte code to JavaScript)
          > In theory you can even prove, that every programming language can be
          > compiled to any other programming language.
          >
          > So if you program in Eiffel, you should not care about how your code gets
          > compiled into something that you can execute. You will start to worry about
          > it as soon as you want to access for example existing C libraries from
          > Eiffel code or if you want to run your Eiffel program on an infrastructure
          > which has some restrictions. But this will for sure not be the case while
          > learning the language (and this is as far as I understood what you want to
          > do at the moment).
          >
          > About documentation material: you are right, there is not so much
          > information about Eiffel online which is about Java, C, or C++. Frankly in
          > my opinion Eiffels documentation is one reason, why it is not that popular
          > (Javas documentation was way better than the one of Eiffel when Java was
          > newly released). But there is still enough material and this mailing list
          > is in my opinion extremely helpful (don't write bug reports directly to
          > EiffelSoftware but post them here -> I once wrote a bug report to Eiffel
          > Software and never saw a reaction). Most of my time I am programming C++
          > and in my experience it is easier to get help on the eiffel mailing list
          > than on C++ mailing lists and forums (and the community is much nicer).
          > Also it probably would be a good idea to by Bertrand Meyers book A touch of
          > class. It is very well written (as most stuff which comes from him) and is
          > an excellent introduction to object oriented programming in general and
          > Eiffel programming specifically. Even in the Java world you imho won't be
          > able to find a book which explains OO as well as this book.
          > Also Object-oriented Software Construction (also by Bertrand Meyer) is a
          > good investment, it is one of the best (if not the best) book about object
          > oriented programming (but less an introduction to Eiffel and OO than Touch
          > of class). After you know Eiffel, the ECMA standard is often a good
          > reference.
          >
          > In general I compliment to the decision of learning Eiffel. My first
          > programming language was Java and I even worked as a programmer before my
          > studies, but only after learning Eiffel I understood object oriented
          > programming fully. IMHO Eiffel, Haskell and C are the programming languages
          > a good computer scientist should learn (and if you know these three,
          > learning any other language is a piece of cake - although you won't be as
          > amazed about "fancy" and hyped programming languages like Python or
          > JavaScript than you would be without that knowledge).
          >
          > Hope this helps a bit. Best
          >
          > Markus
          >
          > On Tue, Nov 1, 2011 at 9:51 AM, Le Legionnaire <le.legioner@...>wrote:
          >
          > > **
          > >
          > >
          > > Many thanks for the clear explanation Peter.
          > >
          > > As I understand it to write the same program in Eiffel and compiled in C,
          > > and then compiled into an executable file will be faster than creating the
          > > same program in pure C? This is the advantage of language Eiffel?
          > > I have so many questions because I do not find much information on the
          > > network by Eiffel. I started to learn the Java language itself, but in many
          > > training courses and the material is not academically, but I did not want
          > > to learn simple phrases like a parrot. I want to understand what I'm doing.
          > > Or do nothing at all ...
          > > But in Java and C have a lot of information online and answer session.
          > >
          > > Thanks for your help!
          > >
          > >
          > > --- In eiffel_software@yahoogroups.com, Peter Gummer <p-gummer@> wrote:
          > > >
          > > > Le Legionnaire wrote:
          > > >
          > > > > I have a question newbie: how can development be faster if you waste
          > > time compiling code from Eiffel code to C and then still have to compile
          > > the code C? Double work as it turns out!
          > > >
          > > > Yes, C compilation is slow, but that doesn't matter because you compile
          > > to C only to freeze or finalise a system. You don't do that very often.
          > > Most of the time, when developing a system, you compile to an intermediate
          > > byte-code format, which is extremely quick. When you have finished testing
          > > your work, or when you're ready to go away for a break, you freeze or
          > > finalise it, and it's finished by the time you are ready to continue
          > > working on it.
          > > >
          > > > - Peter Gummer
          > > >
          > >
          > >
          > >
          >
          >
          > [Non-text portions of this message have been removed]
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.