Re: Coupla Questions

2001-06-07 Thread Graham Barr
On Thu, Jun 07, 2001 at 08:15:46AM +0100, Simon Cozens wrote: > On Wed, Jun 06, 2001 at 07:21:29PM -0500, David L. Nicol wrote: > > Damian Conway wrote: > > > $ref.{a}can be $ref{a} > > which can also be > > $ref.a > > Dereferencing a hashref is the same as accessing

Re: Properties and stricture

2001-06-07 Thread Michael G Schwern
Ok, I've realized a few things. 1) There's two sorts of type-checking going on here. Compile-time and run-time. 2) Run-time type checking is fairly easy and imposes few limitations. In fact, you can even do it now through ad hockery. 3) Compile-time type checking is a bit harder. Any modul

Re: Properties and stricture

2001-06-07 Thread Michael G Schwern
On Wed, Jun 06, 2001 at 10:28:41AM -0400, John Porter wrote: > Michael G Schwern wrote: > > It will have to go for strict classes. @ISA will have to be locked. > > "strict classes"? > "strongly typed class"? Can a man make up gibberish in peace? ;) Basically, any class which wants to be type-c

Re: Properties and stricture

2001-06-07 Thread Michael G Schwern
On Wed, Jun 06, 2001 at 07:06:49PM -0700, Dave Storrs wrote: > But if we did, how could we hope to get a good new Star Trek > series? :> You're still hoping for a new, good Star Trek series??? You must be a Cubs fan. -- Michael G. Schwern <[EMAIL PROTECTED]>http://www.pobox.com/~s

Re: $foo.Foun (was Re: Properties and stricture)

2001-06-07 Thread Michael G Schwern
On Wed, Jun 06, 2001 at 01:37:23AM -0500, Me wrote: > > B&D languages > > What's B&D? Bondage and Discipline, scum! You're not a good enough programmer to be trusted not to make mistakes! Now drop and give me fifty! -- Michael G. Schwern <[EMAIL PROTECTED]>http://www.pobox.com/~schwe

Re: 1 until defined(getvalue()); return $^d;

2001-06-07 Thread Michael G Schwern
On Wed, Jun 06, 2001 at 02:20:25PM -0500, David L. Nicol wrote: > Since this thread made it into this week's Official Perl6 Summary, > here goes a defense of C as a shorthand for the thing that last > had C or C queried of it. Ya know, I hate myself to admit it but I'm liking this idea. The one

Re: Properties and stricture

2001-06-07 Thread John Porter
Michael G Schwern wrote: > Basically, any class which wants to be type-checked at compile time. I think the meaning of that is still not clear, given what "strong typing" usually means. -- John Porter

Re: Properties and stricture

2001-06-07 Thread John Porter
Michael G Schwern wrote: > you can even do it now through ad hockery. Or odd hackery. :-) -- John Porter

Re: Properties and stricture

2001-06-07 Thread Daniel S. Wilkerson
This is similar to the solution they use in Java. You have an interface, which is compile time checked. Then, when you load a class at runtime, you check at load time that it satisfies the interface. You either get an exception right then, or you're fine. Daniel Michael G Schwern wrote: > O

Re: Coupla Questions

2001-06-07 Thread Simon Cozens
On Wed, Jun 06, 2001 at 04:30:56PM +0100, Simon Cozens wrote: > I'm sure I'll think of some more questions Are properties subscriptable? (Can the value of a property be a reference that can be dereferenced?) Can properties have properties? -- The complex-type shall be a simple-type. ISO 10206

Re: $foo.Foun (was Re: Properties and stricture)

2001-06-07 Thread David H. Adler
On Wed, Jun 06, 2001 at 01:37:23AM -0500, Me wrote: > > > Larry's MMV on that ;-) > > Man I really need to get up to speed with these > acronyms. I know YMMV, is MMV a distant > cousin perhaps? Same idea, except it's Larry's Milage in question, rather than Yours. dha -- David H. Adler - <[EM

Re: 1 until defined(getvalue()); return $^d;

2001-06-07 Thread John Porter
David L. Nicol wrote: > I really don't know enough about perl 5 internals to go on; I > am certain that this feature is a no-brainer though Besides the fact which, how it might be added to perl5 does not say much about how it might be implemented in perl6. And it is perl6 we're talking about, r

Re: Coupla Questions

2001-06-07 Thread Damian Conway
> > $ref.{a}can be $ref{a} > > which can also be > > $ref.a > > can it not? Err..no. $ref.{a}/$ref{a} is an access on a hash element through the hashref in $ref. $ref.a is a call to the method a() of the object referred to by

Re: 1 until defined(getvalue()); return $^d;

2001-06-07 Thread David L. Nicol
John Porter wrote: > Huh? What did I say?:: you said there would be no performance hit in rewriting defined|exists to store the pointer to the thing that was found to be defined or exist somewhere. After looking at the source code for what might have been the wrong part of /usr/src/perl/perl-

Re: 1 until defined(getvalue()); return $^d;

2001-06-07 Thread David L. Nicol
John Porter wrote: > > David L. Nicol wrote: > > I really don't know enough about perl 5 internals to go on; I > > am certain that this feature is a no-brainer though > > Besides the fact which, how it might be added to perl5 > does not say much about how it might be implemented in > perl6. And

Re: Properties and stricture and capabilities

2001-06-07 Thread David L. Nicol
Michael G Schwern wrote: > Symbol table manipulation will work as long as your mucking about > doesn't alter the strict class's signature. ie. you can shove a code > ref onto the symbol table as long as a stub for that method was > defined at compile time. a read-only hash of any kind makes it