[comp.lang.misc] Internationalization [was Re: Printing plural

gudeman@cs.arizona.edu (David Gudeman) (03/01/91)

In article  <1991Feb28.171836.29342@linus.mitre.org> Ralph Marshall 617 271-8784 writes:
]gudeman@cs.arizona.edu (David Gudeman) writes:
]>...
]>What does this have to do with having a "real object system"?  You can
]>write different printing routines for different data types in almost
]>any language.
]
]Maybe I don't understand you, but how do you do this in C?

Simple.  Every time you define a data type, also write a procedure to
print it -- just like you would do in a so-called object oriented
language.

Of course this doesn't give you runtime typing.  But runtime typing
(or runtime polymorphism) is orthogonal to object orientation.
--
					David Gudeman
gudeman@cs.arizona.edu
noao!arizona!gudeman

john@mingus.mitre.org (John D. Burger) (03/06/91)

gudeman@cs.arizona.edu (David Gudeman) writes:
> What does this have to do with having a "real object system"?  You
> can write different printing routines for different data types in
> almost any language.

I wrote:
> Maybe I don't understand you, but how do you do this in C?

He replied:
> Simple.  Every time you define a data type, also write a procedure
> to print it -- just like you would do in a so-called object oriented
> language.
> Of course this doesn't give you runtime typing.  But runtime typing
> (or runtime polymorphism) is orthogonal to object orientation.

That's true, but you're just describing a particular example of
procedural abstraction, which we all do already.  I still have to know
whether to call PRINT-DOLLAR-AMOUNT or PRINT-FRANC-AMOUNT.
--
John Burger                                               john@mitre.org

"You ever think about .signature files? I mean, do we really need them?"
  - alt.andy.rooney

gudeman@cs.arizona.edu (David Gudeman) (03/10/91)

In article  <1991Mar5.225011.23386@linus.mitre.org> John D. Burger writes:
]gudeman@cs.arizona.edu (David Gudeman) writes:
]> Simple.  Every time you define a data type, also write a procedure
]> to print it -- just like you would do in a so-called object oriented
]> language.
]
]That's true, but you're just describing a particular example of
]procedural abstraction, which we all do already...

That's my point.  This problem is not one that is solved by object
oriented programming, it is solved by function polymorphism or dynamic
typing.  Both features are independent of object oriented programming.

It may be argued that object-oriented programming makes the
organization more transparent, but then you are dangerously close to
admitting that object-oriented is nothing more than a way of
organizing code and grouping declarations.
--
					David Gudeman
gudeman@cs.arizona.edu
noao!arizona!gudeman