Jonathan Scott Duff wrote:
> On Mon, Aug 14, 2000 at 06:28:23PM -0700, Nathan Wiger wrote:
> > Well, just to counter argue, I feel exactly the opposite way. I'd like
> > the keyword to be "constant" instead of "const". I've always thought
> > "const" was a needless save of 3 characters. Constants
On Mon, Aug 14, 2000 at 06:28:23PM -0700, Nathan Wiger wrote:
> Well, just to counter argue, I feel exactly the opposite way. I'd like
> the keyword to be "constant" instead of "const". I've always thought
> "const" was a needless save of 3 characters. Constants should be obvious
> to pick out. Th
Ed Mills wrote:
>
> I disagree with "const" as it's verbose; I'd rather see something like
> $pi=|3.14128 or something similar.
Well, just to counter argue, I feel exactly the opposite way. I'd like
the keyword to be "constant" instead of "const". I've always thought
"const" was a needless save
John Porter <[EMAIL PROTECTED]> writes:
>Nick Ing-Simmons wrote:
>> Ed Mills <[EMAIL PROTECTED]> writes:
>> >
>> >There are many logical reasons for and against the RFC's here, but saying
>> >"it looks like c so it doesn't make it for me" is a weak argument at best.
>>
>> I don't think anyone ma
Nick Ing-Simmons wrote:
> Ed Mills <[EMAIL PROTECTED]> writes:
> >
> >There are many logical reasons for and against the RFC's here, but saying
> >"it looks like c so it doesn't make it for me" is a weak argument at best.
>
> I don't think anyone made that argument - they have all been
> "I hat
Ed Mills <[EMAIL PROTECTED]> writes:
>
>I've noted a few messages here with statements like "it looks like C++" and
>"I hated that in Pascal" and so on. If we restricted ourselves to constructs
>not found in other languages, there would be no Perl as we know it today.
>Larry freely admits he bo
Steve Simmons writes:
: On Sat, Aug 12, 2000 at 06:18:08AM +1000, Damian Conway wrote:
:
: > Please, please, please, PLEASE, let us not replicate the debacle that is
: > C++'s const modifier!
:
: It doesn't feel like a debacle to me, it feels like it put the control
: in the programmers hands.
ROTECTED]>
>To: [EMAIL PROTECTED]
>CC: [EMAIL PROTECTED], Steve Simmons <[EMAIL PROTECTED]>,Larry Wall
><[EMAIL PROTECTED]>, Mike Pastore <[EMAIL PROTECTED]>, Jeremy
>Howard <[EMAIL PROTECTED]>
>Subject: Re: RFC 83 (v1) Make constants look like
On Sat, Aug 12, 2000 at 06:18:08AM +1000, Damian Conway wrote:
> Please, please, please, PLEASE, let us not replicate the debacle that is
> C++'s const modifier!
It doesn't feel like a debacle to me, it feels like it put the control
in the programmers hands. Yes, the syntax is often unweildy --
Philip Newton wrote:
>
> > $'bar = 'unchanging'; # klingon?
>
> Has there ever been an RFC discussing retention or deletion of this
> backwards-compatibility feature?
Yes. :) RFC71, which caused much grief to Damian: Now he will never be
able to port his new Klingon.pm to Perl 6.
$pkg'var! $d
On Fri, 11 Aug 2000, Mike Pastore wrote:
> $'bar = 'unchanging'; # klingon?
Of course, this is impossible unless Perl6 (finally?) drops compatibility
with the old Perl4 package separator '. Now, $'bar eq $::bar, and package
D'oh is package D::oh.
Has there ever been an RFC discussing retention
> How about any variable created in UPPER case is a constant?
Well, Perl does something similar now, just that they're not readonly.
But as everyone knows messing with @ISA, %ENV, BEGIN, FETCH, etc, etc,
etc will definitely alter your program.
Do we really need constants in Perl? I've always won
At 11:07 AM 8/12/00 +1000, Jeremy Howard wrote:
>My current thinking is that a ref to a constant should only be possible
>through creating a constant first, and then creating a reference to that
>separately.
What, like:
$foo = \5'
which you can do in perl 5 right now. (Basically a scalar's c
Steve Simmons wrote:
> I really like the idea of constants in perl, but think the RFC should
> go a lot further. C/C++ has solved this problem; we should follow in
> their footsteps.
> <...>
I desparately _don't_ want to follow the horrible mess that is const in C++.
The enormous hassle in trying
From: "Nathan Wiger" <[EMAIL PROTECTED]>
Sent: Friday, August 11, 2000 1:58 AM
> How would this take into account stuff like this:
>
>sysopen(HANDLE, "/etc/motd", O_RDWR|O_CREAT, 0644);
This is completely the problem of the module that exports O_RDWR.
O_RDWR could still be defined as a sub tha
Please, please, please, PLEASE, let us not replicate the debacle that is
C++'s const modifier!
Damian
On Fri, Aug 11, 2000 at 06:36:44PM +0100, Andy Wardley wrote:
> How about any variable created in UPPER case is a constant?
This involves Perl dictating style to the user. Very un-Perllike, IMHO.
Michael
--
Administrator www.shoebox.net
Programmer, System Administrator
On Fri, 11 Aug 2000, Andy Wardley wrote:
> > Spinning off from Larrys syntactic comment and Mike
> > Pastores example, how about some of the following:
>
> How about any variable created in UPPER case is a constant?
>
> Quite restrictive, and likely to screw many things up, admittedly,
> but
> Spinning off from Larrys syntactic comment and Mike
> Pastores example, how about some of the following:
How about any variable created in UPPER case is a constant?
Quite restrictive, and likely to screw many things up, admittedly,
but it's an easy rule to remember and one which is generally
I really like the idea of constants in perl, but think the RFC should
go a lot further. C/C++ has solved this problem; we should follow in
their footsteps. Spinning off from Larrys syntactic comment and Mike
Pastores example, how about some of the following:
A constant struct with constant val
How would this take into account stuff like this:
sysopen(HANDLE, "/etc/motd", O_RDWR|O_CREAT, 0644);
The "O_RDWR|O_CREAT" part is what I'm talking about here. This is a
constant w/o suffix. We'll either have to:
1. Change it to $O_RDWR|$O_CREAT or $O{RDWR}|$O{CREAT}
Maybe for error
On Thu, 10 Aug 2000, Perl6 RFC Librarian wrote:
> This method of creating constants has three serious drawbacks:
They're also quite heavy, although I think that CONSTSUB was to take
care of that.
What I never understood, although I'm sure there's a very simple
reason, is why it wasn't simply mad
A semantic definition of "constant" would be nice.
I'd like to propose the following definition:
A constant value cannot be assigned to, deleted, or used as the argument to
a mutating function/operator.
Doing any of these would be a catchable error. (However, it can be deleted
by the GC, and th
> my %STRUCT : constant = (
> Name =>str 'Jane',
Isn't this ambiguous, considering that the => operator quotes the
left side?
-Hao
On Thu, 10 Aug 2000, Larry Wall wrote:
> Can't put a modifier like "constant" in the type slot. The syntax for
> variable attributes will look more like this:
>
> my num $PI : constant = 3.1415926;
> my int @FIB : constant = (1,1,2,3,5,8,13,21);
> my str %ENG_ERRORS : constant = (E_
Perl6 RFC Librarian wrote:
> It is proposed that a new syntax for declaring constants be introduced:
>
> my constant $PI = 3.1415926;
> my constant @FIB = (1,1,2,3,5,8,13,21);
> my constant %ENG_ERRORS = (E_UNDEF=>'undefined', E_FAILED=>'failed');
I like this. Implementation wise, it coul
[EMAIL PROTECTED] writes:
: It is proposed that a new syntax for declaring constants be introduced:
:
: my constant $PI = 3.1415926;
: my constant @FIB = (1,1,2,3,5,8,13,21);
: my constant %ENG_ERRORS = (E_UNDEF=>'undefined', E_FAILED=>'failed');
Can't put a modifier like "constant" in the
This and other RFCs are available on the web at
http://dev.perl.org/rfc/
=head1 TITLE
Make constants look like variables
=head1 VERSION
Maintainer: Jeremy Howard <[EMAIL PROTECTED]>
Date: 10 August 2000
Version: 1
Mailing List: [EMAIL PROTECTED]
Number: 83
=head1 ABSTRACT
This RF
28 matches
Mail list logo