On Sat, Aug 31, 2002 at 01:52:18PM +, Damian Conway wrote:
I'd suggest that redundancy in syntax is often a good thing and
that there's nothing actually wrong with:
my Date $date = Date.new('June 25, 2002');
I would say it is not always redundant to specify the type on both
sides
In a message dated 1 Sep 2002, Uri Guttman writes:
DW == David Wheeler [EMAIL PROTECTED] writes:
DW On Sunday, September 1, 2002, at 05:30 AM, Damian Conway wrote:
Sure. But the right solution is to permanently eliminate the
sesquipedalian
name (so you don't have to retype it
On Mon, Sep 02, 2002 at 04:40:14AM -0400, Trey Harris wrote:
An alias? Isn't
class Date is Really::Long::Package::Name::Ugh;
a new class declaration, declaring 'Date' as a subclass of
Really::Long::Package::Name::Ugh? Because the class body is empty, i.e.
this line is equivalent to
Ken Fox wrote:
The thing I'd like to do right now is turn on :w
for all rules. A Fortran grammar might want to turn
on :i for all rules.
Maybe add modifiers to the grammar declaration?
grammar Fortran :i { ... }
Maybe. Or a property:
grammar Fortran is modified(:i) { ... }
Uri Guttman wrote:
so what that attribute does is force the hash to keep all pairs as
single objects. but what about run time control of it? sometimes you
might want a list of pairs to be handled like pairs and other times you
want pairs to be scalars in a hash assignment. is there any way
Adam D. Lopresto wrote:
That's pretty close to what I was thinking of, but I don't think the
constructors actually have to be special. What if my Date $date; lets the
compiler know that $date belongs to the Date class, even if it's undef? If
that's the case you could call static functions
Graham Barr wrote:
I would say it is not always redundant to specify the type on both
sides
my Dog $dog = Greyhound.new('black');
Sure. But it's the redundant case we were trying to simplify.
And, furthermore, that you could easily define special semantics
for void-context
Trey Harris wrote:
An alias? Isn't
class Date is Really::Long::Package::Name::Ugh;
a new class declaration, declaring 'Date' as a subclass of
Really::Long::Package::Name::Ugh?
Yes. It's not an alias.
it will have a similar effect to aliasing Really::Long::Package::Name::Ugh
Nicholas Clark wrote:
So, based on what I remember about variables, would
class Date := Really::Long::Package::Name::Ugh;
express aliasing of classes?
By analogy to:
my $date := $really::long::variable::name::ugh;
yes.
If Larry allows aliasing of classnames at all, that is.
DC == Damian Conway [EMAIL PROTECTED] writes:
DC Uri Guttman wrote:
so what that attribute does is force the hash to keep all pairs as
single objects. but what about run time control of it? sometimes you
might want a list of pairs to be handled like pairs and other times you
want
At 9:24 PM -0400 8/31/02, Ken Fox wrote:
Damian Conway wrote:
No. It will be equivalent to:
[\x0a\x0d...]
I don't think \n can be a character class because it
is a two character sequence on some systems. Apoc 5
said \n will be the same everywhere, so won't it be
something like
rule
At 4:01 PM +0100 8/29/02, Nicholas Clark wrote:
On Thu, Aug 29, 2002 at 07:52:42AM -0700, Steve Canfield wrote:
From: Dan Sugalski [EMAIL PROTECTED]
I actually had something a bit more subversive
in mind, where the assignment operator for the
Date class did some magic the same way we do
Damian Conway wrote:
Trey Harris wrote:
An alias? Isn't
class Date is Really::Long::Package::Name::Ugh;
a new class declaration, declaring 'Date' as a subclass of
Really::Long::Package::Name::Ugh?
Yes. It's not an alias.
class Date is Really::Long::Package::Name::Ugh;
class
Mike Lambert wrote:
class Date is Really::Long::Package::Name::Ugh;
class DateManipulator;
our Date $date2manip;
...date manip methods here...
An external class is thus unable to do:
$DateManipulator::date2manip = new Really::Long::Package::Name::Ugh()
Is that correct?
Yes. You
Uri Guttman wrote:
but what about mixing pairs and scalars which was the core of this
thread?
Then you get whatever behaviour you defined the hash to give.
by default it seems assigning such a list to a hash would use
the pairs as 2 elements
It's not the right way to think about what
Damian Conway wrote:
One possibility is that a modifier is
implemented via a special class:
my class Decomment is RULE::Modifier
is invoked(:decomment) {
method SETUP ($data, $rule) {
...
}
# etc.
}
On Monday, September 2, 2002, at 03:44 AM, Damian Conway wrote:
my Date $date .= new('Jun 25, 20002');
H. That's a very interesting idea.
I like it.
Hallelujah! I like it, too! It's only one character more than my
original suggestion!
Regards,
David
--
David Wheeler
On Monday, September 2, 2002, at 10:00 AM, Damian Conway wrote:
No, I never said (nor intended to imply) that. Note that I carefully
avoided the
word alias in my description of this technique. ;-)
That was my doing. Sorry folks.
David
--
David Wheeler
I'm working on a library of rules and subroutines for dealing with UNIX
system files. This is really just a mental exercise to help me grasp the
new pattern stuff from A5.
I've hit a snag, though, on hypothetical variables. How would this code
work?
{
my $x = 2;
my $y =
In a message dated 2 Sep 2002, Aaron Sherman writes:
I'm working on a library of rules and subroutines for dealing with UNIX
system files. This is really just a mental exercise to help me grasp the
new pattern stuff from A5.
I've hit a snag, though, on hypothetical variables. How would this
On Mon, 2002-09-02 at 23:50, Trey Harris wrote:
No. $0{x} would be set to grass. $x would stay as 2. $x is in a
different scope from the hypothetical, so it doesn't get touched.
Ok, it's just taking some time for me to get my head around just what
C/.../ and Crule{...} are, but I'm getting
21 matches
Mail list logo