Re: Does anyone in Delphi land NOT use OOP



Andrea Raimondi wrote:

We're talking *object-orientation* here, i.e. inheritance, polymorphism, etc, not *modularization*. Modularization *is not* OO by and in itself,
even if it contributes a lot to the cause.

IMO OO is not very precisely defined. With regards to (multiple) inheritance, virtual methods, polymorphism etc. the various OO languages disagree, which of these properties are absolute requirements.

I'd emphasize *intended* encapsulation of *related* functionality in a black box, with a *chance* for multiple instances of the same class/object.

"Intended" because there exist several ways to deny access to the implementation code or data, or to grant access to the implementation of classes. In so far modularization is a requirement for OOP, but for itself it's not sufficient to guarantee for encapsulation, data integrity etc.

"Related" functionality in contrast to a library or collection of arbitrary functions. Using classes as wrappers around arbitrary functions is not OOP, but can be dictated by a particular language (Java...).

A "chance" for multiple instances, unless there exist reqirements for singletons. In Delphi a unit can represent a singleton, because it's impossible to instantiate it multiple times. OTOH a unit can allow to create any number of "objects", accessible by some kind of a handle.


IMO the most important detail is the intention, to organize functionality in classes and objects. Next comes the support by a dedicated language, that should not only *allow* for OOP, but also should *encourage* to use OOP - but this is not an absolute requirement.

DoDi
.



Relevant Pages

  • Re: Taking a single large .cs file and making many smaller .cs fil
    ... If this were true why have any indirection at all, ... Oriented even if written in an OO language, functionality and code is ... "Adding a layer of indirection always creates more ... if there are multiple files then it's harder to keep ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: [PATCH] ehea: Optional TX/RX path optimized for SMP
    ... the driver in parallel on multiple CPUs. ... packets for an individual tcp stream on the same queue. ... On the send side we also take advantage of ehea's multiple send queue ... This alternative packet processing functionality leads to ...
    (Linux-Kernel)
  • Re: localization with console application?
    ... functionality. ... like the error messages to be supported in multiple languages. ... I just had a look in the MSDN docs and if you search for either "internationalization" or "localization" you can get a lot of information (but most of it is for GUI apps). ... One thing I have found works well with console apps is to stick to UNICODE, there are then functions that can adapt themselves to either UNICODE or ANSI just by changing a few #define's, you can use *.RC files for resources... ...
    (microsoft.public.vsnet.general)
  • Re: how to work with a team on delphi?
    ... > I put them in my version control system. ... This is vital, IMO, especially due to Delphi's inability to either have ... multiple versions components/libraries installed at the same time, ... Another good practice is to never put *.bpl's (other than the standard, ...
    (borland.public.delphi.non-technical)
  • Re: Can anyone tell me
    ... how the registers and stack are setup and destroyed), IMO, it is simply ... syntax change really, eg ... multiple values, as well as simply passing the aruments ByRef, which is ... You can but all of those are not ideal imo. ...
    (microsoft.public.vb.general.discussion)