* Re: OO and modules ( was Which book for ADA beginner ?) @ 2001-02-02 22:13 Mark Lundquist 0 siblings, 0 replies; 5+ messages in thread From: Mark Lundquist @ 2001-02-02 22:13 UTC (permalink / raw) To: comp.lang.ada Hans-Olof Danielsson <Hans-Olof.Danielsson@swipnet.se> wrote in message news:mailman.980777779.24788.comp.lang.ada@ada.eu.org... > Andrzej Lewandowski wrote: > > >...... > > object orientation and modules are in principle orthoogonal concepts, and > > that BOTH and SEPARATE are required to build well structured OO programs. > > That�s interesting. Does that mean that adding, modifying or deleting an > OO-object from a software system doesn�t effect the architecture of it as > the architecture deals with components ( modules ) and their relationship? Of course, if you define architecture to deal only with those things. > > C++, Eiffel, Smalltalk ond others are using classes for both purposes: OO > and > > encapsulation (say, modularization). > > > Ada95 and Oberon are two (well, maybe not > > the ONLY two...) languages that separate these two notions. > >...... > > and are therefore more expressive at the architectual level compared to the > first group languages? Yes, they are more expressive at the architectural level. > > And to which group does Java with its interface and package constructs > belong, the first or the second and why? I think it falls somewhere in between. Java is a class-oriented language, so it has classes which capture the encapsulation aspect of modularity, but it also has packages which capture the namespace aspect of modularity. Interfaces don't really directly have to do with modularity, although they can be used to separate interface from implementation which is an aspect of modularity. However, they are not intended to be used this way on a fine-grained basis -- you typically see it up higher, at the component level (whatever that is :-) Mark Lundquist ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <3A71400E.32057C6B@becker.k.pl>]
[parent not found: <slrn972q4p.k7.randhol+abuse@kiuk0156.chembio.ntnu.no>]
* Re: Which book for ADA beginner ? [not found] ` <slrn972q4p.k7.randhol+abuse@kiuk0156.chembio.ntnu.no> @ 2001-01-26 16:52 ` Brian Rogoff 2001-01-27 2:15 ` Andrzej Lewandowski 0 siblings, 1 reply; 5+ messages in thread From: Brian Rogoff @ 2001-01-26 16:52 UTC (permalink / raw) On Fri, 26 Jan 2001, Preben Randhol wrote: > On Fri, 26 Jan 2001 10:14:54 +0100, arek wrote: > >Hello there > > > >Would you recommend a good book for learning ADA. > >Is a book "ADA - An Advanced Introduction Including Reference Manual for > >the Ada Programming Language" (by Narain Gehani) good for this purpose ? > > I don't know this book, but it depends on how much you know programming > in general. Someone else pointed out that this uses the obsolete Ada-83. You also neglect to mention John English's book for beginners, titled "Ada 95: The Craft of Object Oriented Programming", which is where I'd point beginners. He stresses OOP, which is no doubt contentious, but he uses the same excellent naming conventions as Norman Cohen's book and for that he must be commended (yeah, that's flamebait :). If you have a bit more programming experience, Ben-Ari's book is really worth looking at, and since it uses the RM with fleshed out examples it might be quite helpful for getting into the Ada mindset. I've noticed that the quality of Ada 95 books is amazingly high. -- Brian > > (see http://www.seas.gwu.edu/~mfeldman/ada95books.html for more info on > the books below) > > No programming experience: > > Ada from the Beginning, 3rd ed. > Jan Skansholm > > or > > Ada 95: Problem Solving and Program Design, 3rd ed. > Michael Feldman and Elliot Koffman. > > Some experience: > > Booch, Grady, and D. Bryan. Software Engineering with Ada. 3rd ed. > Benjamin-Cummings, 1993. (ISBN: 0-8053-0608-0; Paperback, $45.25) > Introduces Ada from a software engineering vantage. Addresses the > issues of building complex systems. Includes new features in this > second version: a more thorough introduction to Ada syntax and > semantics, an updated section on object-oriented techniques to > reflect the current state of knowledge, and improved examples that > illustrate good Ada style for production systems development.. > > or > > Object-Oriented Software in Ada 95 > Michael A. Smith. > > Books that cover all of Ada 95 (not so easy to use as introductory > books) > > Programming In Ada 95 (2nd edition!!) > John Barnes. > > or > > Ada as a Second Language (2nd Edition) > Norman Cohen. > > > > > > >Regards > >Arek > > > > > > > -- > Preben Randhol ---------------- http://www.pvv.org/~randhol/ -- > iMy favorite editor is Emacs!<ESC>bcwVim<ESC> > -- vim best-editor.txt > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Which book for ADA beginner ? 2001-01-26 16:52 ` Which book for ADA beginner ? Brian Rogoff @ 2001-01-27 2:15 ` Andrzej Lewandowski 2001-01-28 13:43 ` Preben Randhol 0 siblings, 1 reply; 5+ messages in thread From: Andrzej Lewandowski @ 2001-01-27 2:15 UTC (permalink / raw) "Brian Rogoff" <bpr@shell5.ba.best.com> wrote in message news:Pine.BSF.4.21.0101260844150.2744-100000@shell5.ba.best.com... > On Fri, 26 Jan 2001, Preben Randhol wrote: > > I've noticed that the quality of Ada 95 books is amazingly high. > > -- Brian With some exceptions: Object-Oriented Software in Ada 95 Michael A. Smith. Unless you want to learn how to write C++ program in Ada 95. A.L. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Which book for ADA beginner ? 2001-01-27 2:15 ` Andrzej Lewandowski @ 2001-01-28 13:43 ` Preben Randhol 2001-01-28 18:29 ` Brian Rogoff 0 siblings, 1 reply; 5+ messages in thread From: Preben Randhol @ 2001-01-28 13:43 UTC (permalink / raw) On Fri, 26 Jan 2001 20:15:59 -0600, Andrzej Lewandowski wrote: >With some exceptions: Object-Oriented Software in Ada 95 Michael A. Smith. >Unless you want to learn how to write C++ program in Ada 95. Please explain. -- Preben Randhol ---------------- http://www.pvv.org/~randhol/ -- iMy favorite editor is Emacs!<ESC>bcwVim<ESC> -- vim best-editor.txt ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Which book for ADA beginner ? 2001-01-28 13:43 ` Preben Randhol @ 2001-01-28 18:29 ` Brian Rogoff 2001-01-29 2:28 ` Andrzej Lewandowski 0 siblings, 1 reply; 5+ messages in thread From: Brian Rogoff @ 2001-01-28 18:29 UTC (permalink / raw) I can't speak for Andrzej, but I did notice on perusing the programs at the web site http://www.brighton.ac.uk/ada95/programs/home.htm that Smith tends to use packages as classes. I'm not disposed towards that approach, but I'm also not disposed towards "OO uber-alles" in general so take that however you want to. I don't think that tagged records make variant records obsolete (yes JE, I wish you'd change your book :), so I'd like Ada books to cover a few approaches. -- Brian On Sun, 28 Jan 2001, Preben Randhol wrote: > On Fri, 26 Jan 2001 20:15:59 -0600, Andrzej Lewandowski wrote: > >With some exceptions: Object-Oriented Software in Ada 95 Michael A. Smith. > >Unless you want to learn how to write C++ program in Ada 95. > > Please explain. > > -- > Preben Randhol ---------------- http://www.pvv.org/~randhol/ -- > iMy favorite editor is Emacs!<ESC>bcwVim<ESC> > -- vim best-editor.txt > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Which book for ADA beginner ? 2001-01-28 18:29 ` Brian Rogoff @ 2001-01-29 2:28 ` Andrzej Lewandowski 2001-01-29 14:03 ` OO and modules ( was Which book for ADA beginner ?) Hans-Olof Danielsson 0 siblings, 1 reply; 5+ messages in thread From: Andrzej Lewandowski @ 2001-01-29 2:28 UTC (permalink / raw) "Brian Rogoff" <bpr@shell5.ba.best.com> wrote in message news:Pine.BSF.4.21.0101281019400.7734-100000@shell5.ba.best.com... > I can't speak for Andrzej, but I did notice on perusing the programs at > the web site > > http://www.brighton.ac.uk/ada95/programs/home.htm > > that Smith tends to use packages as classes. I'm not disposed towards that > approach, but I'm also not disposed towards "OO uber-alles" in general so > take that however you want to. I don't think that tagged records make > variant records obsolete (yes JE, I wish you'd change your book :), so > I'd like Ada books to cover a few approaches. > Some people express the opinion that the necessary condition for a language to be OO is that this language has classes. These classes MUST be C++ style. Ada95 (and Oberon; it is interesting what was the impact of Oberon and Wirth's work on extensible types on Ada 95 design of tagged types, if any) has different mechanism. Moreover, it has been pointed out (see the book on component programming by Szyperski and his presentation on one of ECOOPs) that object orientation and modules are in principle orthoogonal concepts, and that BOTH and SEPARATE are required to build well structured OO programs. C++, Eiffel, Smalltalk ond others are using classes for both purposes: OO and encapsulation (say, modularization). Ada95 and Oberon are two (well, maybe not the ONLY two...) languages that separate these two notions. In other words, these languages are the only languages that make this RIGHT. Therefore, an attempt to emulate C++ classes in Ada95 just to have the same mechanisms as in C++ is not a prograss, it is a step backward. A.L. ^ permalink raw reply [flat|nested] 5+ messages in thread
* OO and modules ( was Which book for ADA beginner ?) 2001-01-29 2:28 ` Andrzej Lewandowski @ 2001-01-29 14:03 ` Hans-Olof Danielsson 2001-01-29 15:58 ` James Rogers 2001-02-02 22:06 ` Mark Lundquist 0 siblings, 2 replies; 5+ messages in thread From: Hans-Olof Danielsson @ 2001-01-29 14:03 UTC (permalink / raw) To: comp.lang.ada Andrzej Lewandowski wrote: >...... > object orientation and modules are in principle orthoogonal concepts, and > that BOTH and SEPARATE are required to build well structured OO programs. That�s interesting. Does that mean that adding, modifying or deleting an OO-object from a software system doesn�t effect the architecture of it as the architecture deals with components ( modules ) and their relationship? > C++, Eiffel, Smalltalk ond others are using classes for both purposes: OO and > encapsulation (say, modularization). > Ada95 and Oberon are two (well, maybe not > the ONLY two...) languages that separate these two notions. >...... and are therefore more expressive at the architectual level compared to the first group languages? And to which group does Java with its interface and package constructs belong, the first or the second and why? HOD ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: OO and modules ( was Which book for ADA beginner ?) 2001-01-29 14:03 ` OO and modules ( was Which book for ADA beginner ?) Hans-Olof Danielsson @ 2001-01-29 15:58 ` James Rogers 2001-02-02 22:07 ` Mark Lundquist 2001-02-02 22:06 ` Mark Lundquist 1 sibling, 1 reply; 5+ messages in thread From: James Rogers @ 2001-01-29 15:58 UTC (permalink / raw) Hans-Olof Danielsson wrote: > > Andrzej Lewandowski wrote: > > >...... > > object orientation and modules are in principle orthoogonal concepts, and > > that BOTH and SEPARATE are required to build well structured OO programs. > > That�s interesting. Does that mean that adding, modifying or deleting an > OO-object from a software system doesn�t effect the architecture of it as > the architecture deals with components ( modules ) and their relationship? I do not see how you can draw your conclusion from the above statement. Encapsulation includes the definition of classes, but also includes the definition of what some languages call "name space". This is the ability to differentiate between two classes with the same name in the same program. > > > C++, Eiffel, Smalltalk ond others are using classes for both purposes: OO > and > > encapsulation (say, modularization). C++ has added a new feature called name spaces to allow the use and identification of multiple classes with the same name in a single program. This feature was added because the original concept of all encapsulation occurring only in the class was found to be too limiting, particularly when trying to use pre-defined libraries. > > > Ada95 and Oberon are two (well, maybe not > > the ONLY two...) languages that separate these two notions. > >...... > > and are therefore more expressive at the architectual level compared to the > first group languages? Actually, yes. The ability to define groupings of class definitions does allow greater expressive freedom than languages lacking such ability. > And to which group does Java with its interface and package constructs > belong, the first or the second and why? > Java tries very hard to be like Eiffel and Smalltalk. However, Java added its own versions of name spaces in JDK 1.1. Packages were added, as well as top level nested classes. Both features exist solely to provide the expressiveness of name spaces. I would assert that the developers of Java became aware of the need for name spaces. They added two competing mechanisms to allow the developer to implement name spaces. In the case of packages, they also redefined the meaning of their access modifiers to allow visibility which, IMHO weakens their encapsulation model. Java interfaces are not related to inheritance. They are related to polymorphism, which should never be confused with inheritance. Polymorphism in Java is extended by interface implementation because every class that implements an interface can be relied upon to implement a method with the specific signature published in the interface definition. Syntactically, an interface definition is just that, a definition of method signatures, with the occasional addition of some constants. Do not confuse Java interfaces with abstract classes. Java also has abstract classes. Abstract classes become the basis for an inheritance hierarchy, just as in Ada. Interfaces are never the basis for an inheritance hierarchy. Java syntax makes this distinction very clear. Inheritance is achieved using the "extends" keyword. Interfaces are implemented using the "implements" keyword. Jim Rogers Colorado Springs, Colorado USA ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: OO and modules ( was Which book for ADA beginner ?) 2001-01-29 15:58 ` James Rogers @ 2001-02-02 22:07 ` Mark Lundquist 0 siblings, 0 replies; 5+ messages in thread From: Mark Lundquist @ 2001-02-02 22:07 UTC (permalink / raw) James Rogers <jimmaureenrogers@worldnet.att.net> wrote in message news:3A759385.6BDA29D8@worldnet.att.net... > [...] > C++ has added a new feature called name spaces to allow the > use and identification of multiple classes with the same name in > single program. This feature was added because the original concept > of all encapsulation occurring only in the class was found to be > too limiting, particularly when trying to use pre-defined libraries. The result is that C++ has three different modularity constructs: 1) From C, the file. File-based scoping along with extern declarations are the basis for the ".h/.C" convention. Direct textual inclusion of header files with the problems that attend to that approach. No semantic relationship between the header file and the "implementation file" (i.e. it is legal C/C++ for the implementation file to not fulfill all the protoptypes as declared in the header file. You will get a link error if all the symbol references are not satisfied somehow). 2) Classes 3) Namespaces So you have these three things that kind of overlap and don't seem to complement each other particularly well. I don't like it that namespaces can be textually extended, which means that they don't mean the same thing in all places. The main thing to remember is that C++, like C, is still a linker-based language. -- mark ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: OO and modules ( was Which book for ADA beginner ?) 2001-01-29 14:03 ` OO and modules ( was Which book for ADA beginner ?) Hans-Olof Danielsson 2001-01-29 15:58 ` James Rogers @ 2001-02-02 22:06 ` Mark Lundquist 1 sibling, 0 replies; 5+ messages in thread From: Mark Lundquist @ 2001-02-02 22:06 UTC (permalink / raw) [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1: Type: text/plain, Size: 1768 bytes --] Hans-Olof Danielsson <Hans-Olof.Danielsson@swipnet.se> wrote in message news:mailman.980777779.24788.comp.lang.ada@ada.eu.org... > Andrzej Lewandowski wrote: > > >...... > > object orientation and modules are in principle orthoogonal concepts, and > > that BOTH and SEPARATE are required to build well structured OO programs. > > That�s interesting. Does that mean that adding, modifying or deleting an > OO-object from a software system doesn�t effect the architecture of it as > the architecture deals with components ( modules ) and their relationship? Of course, if you define "architecture" in such a way as to deal only with those things. Otherwise, not. > > C++, Eiffel, Smalltalk ond others are using classes for both purposes: OO > and > > encapsulation (say, modularization). > > > Ada95 and Oberon are two (well, maybe not > > the ONLY two...) languages that separate these two notions. > >...... > > and are therefore more expressive at the architectual level compared to the > first group languages? Yes, they are more expressive at the architectural level. > > And to which group does Java with its interface and package constructs > belong, the first or the second and why? I think it falls somewhere in between. Java is a class-oriented language, so it has classes which capture the encapsulation aspect of modularity, but it also has packages which capture the namespace aspect of modularity. Interfaces don't really directly have to do with modularity, although they can be used to separate interface from implementation which is an aspect of modularity. However, they seem not to intended to be used this way on a fine-grained basis -- you typically see it up higher, at the component level (whatever that is :-) Mark Lundquist ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2001-02-02 22:13 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2001-02-02 22:13 OO and modules ( was Which book for ADA beginner ?) Mark Lundquist [not found] <3A71400E.32057C6B@becker.k.pl> [not found] ` <slrn972q4p.k7.randhol+abuse@kiuk0156.chembio.ntnu.no> 2001-01-26 16:52 ` Which book for ADA beginner ? Brian Rogoff 2001-01-27 2:15 ` Andrzej Lewandowski 2001-01-28 13:43 ` Preben Randhol 2001-01-28 18:29 ` Brian Rogoff 2001-01-29 2:28 ` Andrzej Lewandowski 2001-01-29 14:03 ` OO and modules ( was Which book for ADA beginner ?) Hans-Olof Danielsson 2001-01-29 15:58 ` James Rogers 2001-02-02 22:07 ` Mark Lundquist 2001-02-02 22:06 ` Mark Lundquist
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox