Re: Perl Object Creation problem...
- From: "howa" <howachen@xxxxxxxxx>
- Date: 29 Jun 2006 19:35:45 -0700
Tad McClellan 寫道:
howa <howachen@xxxxxxxxx> wrote:
lawre...@xxxxxxxxxxxxxxxxxxx ???
"howa" <howachen@xxxxxxxxx> writes:
it seems a little stupid if the class name must be the package full
name...
Perhaps this will offer enlightenement:
Suppose I have two classes Road::Apple and Fruit::Apple
#/usr/local/bin/howas-private-perl-like-language
use Road::Apple;
use Fruit::Apple;
my $thing = new Apple;
What kind of apple whould $thing be?
I don't think that was a rhetorical question, but you did not
address it.
What kind of apple whould $thing be?
One is delicious, the other not
so much.
[snip .sig, you are not supposed to quote those you know]
in other language, you also have this problem, java or c.^^^^
What is with the "also" there?
Perl does not have that problem.
in fact, this is not a problem at all,
Then what kind of apple whould $thing be?
A red one or a brown one?
If the programmer cannot tell, then it looks like a problem to me...
--
Tad McClellan SGML consulting
tadmc@xxxxxxxxxxxxxx Perl programming
Fort Worth, Texas
did you even have experience on java or c? (no offense)
how they handle namespace/package/import/include ?
of coz perl has more then one way to do it, but seems the way how perl
handle it is not a good solution.
.
- Follow-Ups:
- Re: Perl Object Creation problem...
- From: Tad McClellan
- Re: Perl Object Creation problem...
- From: Stephan Titard
- Re: Perl Object Creation problem...
- References:
- Perl Object Creation problem...
- From: howa
- Re: Perl Object Creation problem...
- From: Aukjan van Belkum
- Re: Perl Object Creation problem...
- From: howa
- Re: Perl Object Creation problem...
- From: Brian McCauley
- Re: Perl Object Creation problem...
- From: howa
- Re: Perl Object Creation problem...
- From: lawrence
- Re: Perl Object Creation problem...
- From: howa
- Re: Perl Object Creation problem...
- From: Tad McClellan
- Perl Object Creation problem...
- Prev by Date: providig a filename as an argument fom the command line
- Next by Date: Re: providig a filename as an argument fom the command line
- Previous by thread: Re: Perl Object Creation problem...
- Next by thread: Re: Perl Object Creation problem...
- Index(es):
Relevant Pages
|
|