a logic excursion

R

Rainer Weikusat

This is going to be totally dull and of no interest or use to anyone
except a logic geek.

------------
A programming language can only be used if it is useful for solving
real problems.

Java is being used. [*]

Therefore, Java is useful for solving real problems.

The Java object system is restricted to single inheritance.

Java is useful for solving real problems.

Therefore, an object system restricted to single inheritance is useful
for solving real problems.

An object system useful for solving real problems cannot have
limitations precluding such use.

An object system limited to single inheritance is useful for solving
real problems.

Therefore, 'being limited to single inheritance' does not preclude an
object system from being useful to solve real problems.

XXX is an object system limited to single inheritance.

Being limited to single inheritance does not preclude an object system
from being useful to solve real problem.

Therefore, XXX is not precluded from being useful to solve real
problem because it is limited to single inheritance.
-------------

It should be noted that 'Java is being used a lot' figures only insofar
in here as it makes [*] 'an undisputed fact'. This obvsiously still
needs some goodwill on the part of an interpreter because of the
'fuzziness' of natural language.

A 'real' ad populum fallacy:

Only good tools can ever become popular.

Hashes are a popular way to represent Perl objects.

Therefore, hashes are a good way to represent Perl objects.
 
J

Jim Gibson

Rainer said:
This is going to be totally dull and of no interest or use to anyone
except a logic geek.

------------
A programming language can only be used if it is useful for solving
real problems.

Java is being used. [*]

I am using Java ...
Therefore, Java is useful for solving real problems.

.... to solve real problems.
The Java object system is restricted to single inheritance.

.... and Java includes the concept of Interfaces, plus many other useful
characteristics.
Java is useful for solving real problems.

Therefore, an object system restricted to single inheritance is useful
for solving real problems.

.... as long as that object system includes something akin to Interfaces
and other useful constructs.
An object system useful for solving real problems cannot have
limitations precluding such use.

An object system limited to single inheritance is useful for solving
real problems.

.... as long as that language has sufficiently useful other
characteristics (such as Interfaces).
Therefore, 'being limited to single inheritance' does not preclude an
object system from being useful to solve real problems.

XXX is an object system limited to single inheritance.

Being limited to single inheritance does not preclude an object system
from being useful to solve real problem.

Therefore, XXX is not precluded from being useful to solve real
problem because it is limited to single inheritance.

You seem to be focusing only on the single-inheritance characteristic
of languages to determine whether or not they are useful. I believe
that you must consider all the characteristics of a language in
deciding whether or not it is useful for a particular task. I find both
Perl and Java useful in my work, for different reasons and for
different tasks.
-------------

It should be noted that 'Java is being used a lot' figures only insofar
in here as it makes [*] 'an undisputed fact'. This obvsiously still
needs some goodwill on the part of an interpreter because of the
'fuzziness' of natural language.

A 'real' ad populum fallacy:

Only good tools can ever become popular.

Hashes are a popular way to represent Perl objects.

Therefore, hashes are a good way to represent Perl objects.

I don't believe anybody is claiming that hashes are a good way to
represent Perl objects because they are popular. I believe that hashes
are popular because they are good. The advantages the hashes have over
other schemes have been discussed. Personally, I prefer the simplicity
of hashes, but then I don't do a lot of OO programming in Perl.
 
R

Rainer Weikusat

Jim Gibson said:
Weikusat said:
This is going to be totally dull and of no interest or use to anyone
except a logic geek.

------------
A programming language can only be used if it is useful for solving
real problems.

Java is being used. [*]

I am using Java ...
Therefore, Java is useful for solving real problems.

... to solve real problems.
The Java object system is restricted to single inheritance.

... and Java includes the concept of Interfaces, plus many other useful
characteristics.
Java is useful for solving real problems.

Therefore, an object system restricted to single inheritance is useful
for solving real problems.

... as long as that object system includes something akin to Interfaces
and other useful constructs.

That's besides the point here since this was supposed to provide a
chain of proper 'premises and conclusions' showing that pointing at
Java as an example of a widely-used OO system limited to single
inheritance and claiming that this would demonstrate that single
inheritance OO systems are useful for solving real problems is not 'an
appeal to popularity'.

As I wrote in another posting: 'Interfaces' in Java are essentially a
workaround for (intentional) limitations of the Java compiler. It is
necesary to inform this compiler 'somehow' that two unrelated objects
provide compatible methods in order to be able to exploit this
fact. This isn't necessary in Perl because it is rather a message
passing system and 'methods' (as represented by their names) are not
tied to the classing implementing them.

[...]
You seem to be focusing only on the single-inheritance characteristic
of languages to determine whether or not they are useful.

In this was, this was "demonstrating that single-inheritance cannot be
a crippling limitation of an OO system".

[...]
I don't believe anybody is claiming that hashes are a good way to
represent Perl objects because they are popular. I believe that hashes
are popular because they are good.

That's exactly the same reasoning error: Hashes may be a good 'general
purpose solution' but whether they are a popular general purpose
solution doesn't matter for this (except if 'good' is defined as
'popular').
The advantages the hashes have over other schemes have been
discussed.

This disadvantages have been 'discussed' to some degree (namely, by
me) but a discussion of the advantages is still missing. "Can somehow
be used to implement multiple inheritance" isn't one since arrays can
also "somehow be used to implement multiple inheritances" and since
"multiple inheritance" isn't something which is useful because of
itself: There are a good many situation where it isn't needed.
 
R

Rainer Weikusat

[...]

This disadvantages have been 'discussed' to some degree (namely, by
me) but a discussion of the advantages is still missing.

There's actually a 'covert point' about that in Jim Gibsons posting,
namely

| Personally, I prefer the simplicity of hashes

Which could be understood as 'they can be used to access properties by
name without declaring them' and they can also be used to provide
data inheritance 'without declaring anything' based on the convention
that all packages sharing an anonymous has must use unique property
names.

I'll leave that as it stands because these are valid concerns.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,821
Latest member
AleidaSchi

Latest Threads

Top