Eppur si sugat

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Eppur si sugat

Bengt Kleberg-3

> Date: Tue, 27 May 2003 04:39:48 -0400
> From: Todd Coram <tcoram>
> To: Bengt Kleberg <eleberg>
> Cc: erlang-questions


> On Tue, 27 May 2003 10:54:47 +0200 (MEST)
> Bengt Kleberg <eleberg> wrote:
>
>  
> > there is an oo book, without language. ie, a book that claims to deal
> > with oo, and not a particular oo language. it is ''object oriented
> > software construction'', by bertrand meyer. perhaps it would be
> > possible to aim the anti-oo critique towards the ideas in that book?
>
> That book, while well written, is very much with a language: Eiffel. The
> author explains at the end of the book that he has just taught you
> Eiffel. (Which he hopefully would then have you purchase it from his company
;-)

i do not agree. (imho, fwiw, etc)

he describes what he wants to do, and then introduces a formal way of
writing this. so yes, there is a language, but that language is beeing
built/constructed in the book. the book is not about the language.

other oo books i have seen starts with the languge, showing what the
language can do.


bengt, who wishes he could explain the difference better...



Reply | Threaded
Open this post in threaded view
|

Eppur si sugat

Joe Williams-2
> > From: Todd Coram <tcoram>
> > To: Bengt Kleberg <eleberg>
> > Cc: erlang-questions
>
>
> > On Tue, 27 May 2003 10:54:47 +0200 (MEST)
> > Bengt Kleberg <eleberg> wrote:
> >
> >  
> > > there is an oo book, without language. ie, a book that claims to deal
> > > with oo, and not a particular oo language. it is ''object oriented
> > > software construction'', by bertrand meyer. perhaps it would be
> > > possible to aim the anti-oo critique towards the ideas in that book?
> >
> > That book, while well written, is very much with a language: Eiffel. The
> > author explains at the end of the book that he has just taught you
> > Eiffel. (Which he hopefully would then have you purchase it from his company
> ;-)
>
> i do not agree. (imho, fwiw, etc)

  Since I have the book in question in my bookshelves I thought I'd check ...

  Part I - is "Issues and principles"
  Part II - is "Techniques of OO design and programming"

  Part I is general, Part II is stuffed full of Eiffel

  Part I is full of rather general statements about good ways to program.

  Lot's of general statements like:

  - Design simplicity: a simple architecture will always be easier to adapt
to changes than a complex one (page 5)

  "Every module should communicate with as few others as possible" (page 19)

  Then he goes on at great length to say "Abstract data types are wonderful"

  In part I  there is virtually nothing I disagree with  - and all the
statements  he  makes  are   equally  applicable  to  *any*  style  of
programming - just general good advice, equally applicable to C, Java,
Erlang, Basic, Cobol  you name it - And (virtually)  nothing do do with
OO (at least not *exclusively* so).

  Part II - *is* Eiffel. The book  reeks Eiffel - Part II shows how to
achieve the goals in part I (nothing wrong with that) - But since I is
so  general then  part  II could  equally  well have  been written  in
Erlang/C/anything - the goal being  to show how good design principles
(like  minimal  interfaces,  ADTs  etc)  can  be  implemented  in  any
language.

 I would not call this a "oo book without language" and I think Meyer's
title is misleading.

 It's not about OO software construction. It's more

 "generally good design principles" + how to code things in Eiffel.

  The fact  the "OO"  word is on  the cover  and the word  "eiffel" is
absent from the cover notes is probably to sell more titles.

  /Joe

 Anyhow why all the fuss --- Erlang *is* OO

 1) OO langauges are great, and stuffed full of generally "good to have"
    things.

 2) Erlang is great and stuffed full of "good to have" things.

 3) Therefore Erlang is an OO language


  QED




Reply | Threaded
Open this post in threaded view
|

Eppur si sugat

Todd Coram
Joe Armstrong wrote:

>   Since I have the book in question in my bookshelves I thought I'd check
...
>
>   Part I - is "Issues and principles"
>   Part II - is "Techniques of OO design and programming"
>
>   Part I is general, Part II is stuffed full of Eiffel
>
>   Part I is full of rather general statements about good ways to program.
>

Ah, you must have the first edition... The second edition weighs in at about
1200 pages and greatly expands upon the Eiffel-ness (it even comes with a
"demo" Eiffel development environment --- but never referred to as Eiffel).

>   In part I  there is virtually nothing I disagree with  - and all the
> statements  he  makes  are   equally  applicable  to  *any*  style  of
> programming - just general good advice, equally applicable to C, Java,
> Erlang, Basic, Cobol  you name it - And (virtually)  nothing do do with
> OO (at least not *exclusively* so).

Yes. Those are the comforting bits. It's my favorite OO text because Meyer
speaks his mind, stays away from "fashionable trends" (with the exception of
OO iteself ;-) and generally irritates other non-Eiffel OO advocates.

BTW, Meyer's big claim to fame is "Design by Contract". Although woven
throughout Eiffel, it has been applied to other languages as well.  Design
by Contract specifies that you impose "contracts" (assertive statements)
upon your functions that check a pre-condition (are the parameters correct?)
and post-conditions (did the function produce what I expected?). Also, there
are "class invariants" that make sure that certain variable boundaries are
never broken (e.g. count must never be below 0 and above 255).

I suppose that the preconditions could be accomplished in Erlang by the use
of guards (bear with me, I'm an Erlang newbie), but postconditions and class
invariants have little analog in functional programming (no side-effects!).

But, then, OO is all about side-effects -  (ab)use as many variables as
needed so as long as they are encapsulated! You need postconditions and
class invariants to keep track of what variables may have been accidently
violated...

-- todd




Reply | Threaded
Open this post in threaded view
|

Eppur si sugat

Hrvoje Nezic
In reply to this post by Joe Williams-2
>  It's not about OO software construction. It's more
>
>  "generally good design principles" + how to code things in Eiffel.

This is simply not true. OOSC2 is not a book about Eiffel.
Meyer's book is about software construction, from his
own point of view, of course.

Most books about programming languages just describe
syntax and semantics of a given language. Meyer's book
is very different and almost unique: he discusses various
possibilities, dillemas, why some features had to be rejected,
etc.

And this is a fine book, and Eiffel is a very fine language
("arguably the best object-oriented language").
Of course, if O-O is considered bad by definition,
this means nothing.

For me, O-O (especially in elegant and well-designed
languages, like Eiffel) means big progress from C and alike,
freedom from having allocating memory by hand,
dealing with pointers etc, etc.
In this way Eiffel is light years ahead of C.

I am open minded, I love to learn new things and explore
new possibilities. That is why I am on this list.
I like at least some aspects of Erlang (especially
processes).

However, stating that some other paradigms,
like O-O, are completely wrong, is too much
in my opinion.

>   The fact  the "OO"  word is on  the cover  and the word  "eiffel" is
> absent from the cover notes is probably to sell more titles.

This is not a fair statement and not a right way to criticize "ideological
enemy", like Meyer. Meyer's book is about object oriented
programming. He obviously had to include some program examples
in the book. What were his options? To use pseudo-code?
To use C++? Simula? Smalltalk? Java (nonexisting when
he wrote the first edition)? Eiffel was invented because there
were no other suitable O-O language. So, he obviously used
Eiffel, not only because he invented it, but because it is
in many ways superior to alternatives.

By the way, OOSC-2 is not the only Meyer's book.
His book about Eiffel is called "Eiffel the Language".
If OOSC-2 was book about Eiffel, why he wrote ETL?
Of course, you can say that he wrote it to make more
money, but again, I think this would not correspond to
facts.

Regards,
Hrvoje Nezic




Reply | Threaded
Open this post in threaded view
|

Eppur si sugat

Joe Williams-2
On Tue, 27 May 2003, Hrvoje Nezic wrote:

> >  It's not about OO software construction. It's more
> >
> >  "generally good design principles" + how to code things in Eiffel.
>
> This is simply not true. OOSC2 is not a book about Eiffel.
> Meyer's book is about software construction, from his
> own point of view, of course.

  What???


  I was referring to  "Object Oriented Software construction" by Meyer
(the first edition published in 1988) - I don't have the second version
so I can't comment in it.


  The book is about Software  construction in Eiffel - That's what the
"+" means. How  can a book with hundreds of examples  in Eiffel not be
about Eiffel. It's not *exclusively*  about Eiffel, since this is a lot
of stuff  of software design  - but it  certainly IS about  Eiffel AND
software  design. It is  certainly not  about general  software design
since many  of the mechanisms  described in the  book do not  apply to
other languages - they are specific to Eiffel and similar languages

  It seems  to me  to be  very much a  book about  Eiffel -  The first
chapter in part II is  called "Basic Elements of Eiffel programming" -
thereafter follow loads  of small code fragments all  in Eiffel as far
as I can see.

  Appendix C  is the Eiffel grammar  - and a quick  check reveals that
all the code fragments appear to be written in Eiffel.

  As I  pointed out part I is  mostly general common sense  and is not
exclusively owned  by any school  of programming, ADTs  and information
hiding are general techniques applicable to any style of programming.

>
> Most books about programming languages just describe
> syntax and semantics of a given language. Meyer's book
> is very different and almost unique: he discusses various
> possibilities, dilemmas, why some features had to be rejected,
> etc.

  "almost unique"  - I  doubt it  - there are  *many* good  books that
discuss language-design tradeoffs - how about "Abelson and Sussman's -
structure  and   interpretation  of  computer   programs",  Wirth  and
Gutknecht's Oberon book, Brinch Hanssen's operating system principles,
Allen's anatomy  of lisp ... Meyer's  book is certainly  good but not
unique.

>
> And this is a fine book, and Eiffel is a very fine language
> ("arguably the best object-oriented language").
> Of course, if O-O is considered bad by definition,
> this means nothing.
>

  Yes Eiffel is one  of the better OO languages - O-O  is *not* bad by
definition. Particular  OO language  are bad, for  particular reasons,
Java is bad  because the concurrency model is  screwed up, C++ because
you can easily confuse or break the type system, ..

  I have even designed an OO language (OIL = Object Inspired Language)
- << son of Erlang :-) >> - and  I can image a good OO language, but I
just havn't seen one yet (apart from OIL, that is :-)

> For me, O-O (especially in elegant and well-designed
> languages, like Eiffel) means big progress from C and alike,
> freedom from having allocating memory by hand,
> dealing with pointers etc, etc.
> In this way Eiffel is light years ahead of C.
>

  So  is LISP -  we had  GC etc  in 1959  in lisp  1.5 -  freedom from
pointers  etc.  has  nothing to  do with  OO.  Many  languages (logic,
functional, OO,  imperative, have freedom from pointers  - even visual
basic :-)


> I am open minded, I love to learn new things and explore
> new possibilities. That is why I am on this list.
> I like at least some aspects of Erlang (especially
> processes).
>
> However, stating that some other paradigms,
> like O-O, are completely wrong, is too much
> in my opinion.

  I have never said O-O is  completely wrong (I said it "sucks") - and
if you choose  a title like "Why OO sucks" more  people will read your
article than if you say "a few things I don't like about OOPLs"

>
> >   The fact  the "OO"  word is on  the cover  and the word  "eiffel" is
> > absent from the cover notes is probably to sell more titles.
>
> This is not a fair statement and not a right way to criticize "ideological
> enemy",

  This  statement was  not intended  as a  criticism -  and he's  not an
enemy.

  Meyer said a lot of sensible things in his book. If you write a book
about a  relatively obscure language  it might be  a good idea  not to
mention it on the cover - you might sell more that way - that's a fact
of life.

> like Meyer. Meyer's book is about object oriented
> programming. He obviously had to include some program examples
> in the book. What were his options? To use pseudo-code?
> To use C++? Simula? Smalltalk? Java (nonexisting when
> he wrote the first edition)? Eiffel was invented because there
> were no other suitable O-O language. So, he obviously used
> Eiffel, not only because he invented it, but because it is
> in many ways superior to alternatives.


> By the way, OOSC-2 is not the only Meyer's book.
> His book about Eiffel is called "Eiffel the Language".
> If OOSC-2 was book about Eiffel, why he wrote ETL?
> Of course, you can say that he wrote it to make more
> money, but again, I think this would not correspond to
> facts.

I assume he wrote it to promote eiffel.

The fact that he wrote a book called "Eiffel the language" is irrelevant
to any discussion of OOSC.

>
> Regards,
> Hrvoje Nezic
>
>

/Joe