2. The question I was trying to answer by poking around: what is/will
be the P6 equivalent of P5's $. ? I assume the answer is a method on
the filehandle object, but called what? Should it keep the P5
IO::Handle name (input_line_number)? Or something else perhaps a
little less unwieldy (lineno, recno, ...)
I don't see any reference to $. in the Synopses, so I assume this is
not yet defined. Apologies if I just missed it.
--
Mark J. Reed <mark...@mail.com>
Yes, this is why MO integration is the next milestone in pugs.
The parrot folks are also heavily at work in the meta-object area.
: 2. The question I was trying to answer by poking around: what is/will
: be the P6 equivalent of P5's $. ? I assume the answer is a method on
: the filehandle object, but called what? Should it keep the P5
: IO::Handle name (input_line_number)? Or something else perhaps a
: little less unwieldy (lineno, recno, ...)
Probably something shorter. The problem with "lines" is that they aren't
necessarily lines. But "records" is so 1960s... Also, anything that
names the units could be seen as the count of those units in the file as
a whole rather that the number read up till now.
Tempted to have $io.sofar or some such...
: I don't see any reference to $. in the Synopses, so I assume this is
: not yet defined. Apologies if I just missed it.
There's a prototype synopsis on variables out in pugs/docs/AES but it's
still pretty rudimentary.
As for $. itself as a variable, it's dead. Its "twigil" has been stolen
by $.foo for object attributes, and we're trying not to reuse twigils
for bare variable names, though it comes to mind that we have both $! and
$!foo currently. But there are very, very few punctuational variables
in Perl 6 compared to Perl 5. Most of 'em are just gone.
Larry
"chunks"?
> Also, anything that names the units could be seen as the count of those units in the file
> as a whole rather that the number read up till now.
Yeah, that's why I suggested the names with "...no". Although that's
not necessarily clear, especially to non-native English speakers.
"...num" might be better...
> Tempted to have $io.sofar or some such...
Maybe there could be different (adverbial?) variants of .tell for
different units? Bytes, lines (actual lines irrespective of whatever
the record separator is set to), chunks?
> There's a prototype synopsis on variables out in pugs/docs/AES but it's
> still pretty rudimentary.
Ah, thanks! Missed that.
> As for $. itself as a variable, it's dead.
Yeah, kinda figured.
> there are very, very few punctuational variables in Perl 6 compared to Perl 5. Most of
> 'em are just gone.
And a cheer went up from the multitude... :)
Thanks again for the reply.