Re: clarifying the spec for 'ref'

2006-08-25 Thread Juerd
Luke Palmer skribis 2006-08-24 23:57 (-0600): Let's say our arrays are simple, for argument's sake: With a constant array, you can: * get its length * get the value of an element at an index With an array, you can: * get its length * get the value of an element at an index * set

Re: clarifying the spec for 'ref'

2006-08-25 Thread Mark J. Reed
On 8/25/06, Juerd [EMAIL PROTECTED] wrote: You define in terms of functionality, but don't provide an explanation for the chosen point of view. One could say that constant arrays protect against modifications, which normal arrays don't. Hence, constant arrays do *more*. I think the

Re: My first functional perl6 program

2006-08-25 Thread John Macdonald
On Wed, Aug 23, 2006 at 04:10:32PM -0700, Larry Wall wrote: Yes, that should work eventually, given that hypers are supposed to stop after the longest *finite* sequence. In theory you could even say my %trans = ('a'..*) »=« ('?' xx *); but we haven't tried to define what the semantics

Re: clarifying the spec for 'ref'

2006-08-25 Thread Larry Wall
On Fri, Aug 25, 2006 at 08:40:59AM -0400, Mark J. Reed wrote: : On 8/25/06, Juerd [EMAIL PROTECTED] wrote: : You define in terms of functionality, but don't provide an explanation : for the chosen point of view. One could say that constant arrays protect : against : modifications, which normal

Same-named arguments

2006-08-25 Thread Michael Snoyman
I asked this same question on perl6-users, but no one really seemed to have a definitive answer, so please forgive me for reasking. I was wondering how named arguments would work when parameters of different types had the same name, ie sub foo($bar, @bar, bar) {...}. I wrote a little script to

Re: clarifying the spec for 'ref'

2006-08-25 Thread Trey Harris
In a message dated Fri, 25 Aug 2006, Mark J. Reed writes: I think the justification for Luke's POV is the number of operations each class provides. But my perspective agrees with Juerd - subclasses can remove functionality as well as adding it, and I definitely view constant as an add-on

Re: clarifying the spec for 'ref'

2006-08-25 Thread jerry gay
On 8/25/06, Trey Harris [EMAIL PROTECTED] wrote: In a message dated Fri, 25 Aug 2006, Mark J. Reed writes: I think the justification for Luke's POV is the number of operations each class provides. But my perspective agrees with Juerd - subclasses can remove functionality as well as adding

Re: clarifying the spec for 'ref'

2006-08-25 Thread Trey Harris
In a message dated Fri, 25 Aug 2006, jerry gay writes: perhaps trey meant subclasses can add constraints as well as functionality instead of subclasses can remove functionality as well as adding it. just a guess. ~jerry Ok... same thing from a DBC perspective. Subclasses can add

Re: clarifying the spec for 'ref'

2006-08-25 Thread Mark J. Reed
On 8/25/06, Trey Harris [EMAIL PROTECTED] wrote: subclasses can remove functionality as well as adding it Can someone suggest some reading I can do to understand how that works? I can't wrap my head around the idea of subclasses removing functionality. Why not? Is it any weirder than

Re: clarifying the spec for 'ref'

2006-08-25 Thread Paul Seamons
Does this mean you can't write class Super { method something { ... } } sub foo (Super $bar) { $bar.something() } and expect foo($obj) to work, because $obj might be: class Sub is Super { # remove .something--how does that happen? } foo($obj); # Boom!? So what happens?

[svn:perl6-synopsis] r11421 - doc/trunk/design/syn

2006-08-25 Thread larry
Author: larry Date: Fri Aug 25 12:28:00 2006 New Revision: 11421 Modified: doc/trunk/design/syn/S06.pod Log: Discussed relationship of is syntax to adverb syntax and type syntax. Nailed down some (hopefully) sane default behaviors for equiv and assoc. Modified: doc/trunk/design/syn/S06.pod

Re: clarifying the spec for 'ref'

2006-08-25 Thread Trey Harris
In a message dated Fri, 25 Aug 2006, Mark J. Reed writes: On 8/25/06, Trey Harris [EMAIL PROTECTED] wrote: subclasses can remove functionality as well as adding it Can someone suggest some reading I can do to understand how that works? I can't wrap my head around the idea of subclasses

Re: clarifying the spec for 'ref'

2006-08-25 Thread Larry Wall
On Fri, Aug 25, 2006 at 12:38:33PM -0700, Trey Harris wrote: : But in order to allow that choice, the language has to impose some : groundrules for everyone. strict couldn't exist in Perl 5 if lexicals : could autovivify. And--*by my understanding of DBC*--subclasses can't : remove promised

Re: clarifying the spec for 'ref'

2006-08-25 Thread Mark J. Reed
OK, I admit I wasn't thinking about things from a DBC perspective, and misunderstood DBC to be a reference to some database module. I here am new and I didn't have context. My bad. But if we're talking design-by-contract, I don't see how Array is Array::Const can work, either, since I consider

Re: clarifying the spec for 'ref'

2006-08-25 Thread Mark J. Reed
On 8/25/06, Mark J. Reed [EMAIL PROTECTED] wrote: I here am new and I didn't have context. Well, technically, I here am not new; I've been here since before Apoc 1. But I hadn't been paying close attention for a while until recently. :) Either way, I didn't get the ref. -- Mark J. Reed

Re: clarifying the spec for 'ref'

2006-08-25 Thread Daniel Hulme
If changing that functionality beyond recognition means changing its external behavior (as opposed to its internal behavior) so that it acts differently from what the superclass had promised to do, then no, it's not any weirder--but I can't figure out how the contract would work, either.

Re: clarifying the spec for 'ref'

2006-08-25 Thread Juerd
Trey Harris skribis 2006-08-25 11:33 (-0700): Ok... same thing from a DBC perspective. Subclasses can add functionality (by AND'ing postconditions), or remove constraints (by OR'ing preconditions), but they can't traditionally remove functionality or add constraints. I just want to read

Re: clarifying the spec for 'ref'

2006-08-25 Thread Trey Harris
In a message dated Fri, 25 Aug 2006, Mark J. Reed writes: OK, I admit I wasn't thinking about things from a DBC perspective, and misunderstood DBC to be a reference to some database module. I here am new and I didn't have context. My bad. But if we're talking design-by-contract, I don't see

Re: clarifying the spec for 'ref'

2006-08-25 Thread Trey Harris
In a message dated Fri, 25 Aug 2006, Juerd writes: Trey Harris skribis 2006-08-25 11:33 (-0700): Ok... same thing from a DBC perspective. Subclasses can add functionality (by AND'ing postconditions), or remove constraints (by OR'ing preconditions), but they can't traditionally remove

Re: clarifying the spec for 'ref'

2006-08-25 Thread Juerd
Trey Harris skribis 2006-08-25 13:26 (-0700): Explain to me how nontraditional DBC might work in an internally consistent way. Otherwise, this is hand-waving. :-) Perl *is* hand-waving.

Re: clarifying the spec for 'ref'

2006-08-25 Thread Trey Harris
In a message dated Fri, 25 Aug 2006, Daniel Hulme writes: If changing that functionality beyond recognition means changing its external behavior (as opposed to its internal behavior) so that it acts differently from what the superclass had promised to do, then no, it's not any weirder--but I

Re: clarifying the spec for 'ref'

2006-08-25 Thread Trey Harris
In a message dated Fri, 25 Aug 2006, Juerd writes: Trey Harris skribis 2006-08-25 13:26 (-0700): Explain to me how nontraditional DBC might work in an internally consistent way. Otherwise, this is hand-waving. :-) Perl *is* hand-waving. Yeah, but hand-waving on how it manages the behavior

Re: clarifying the spec for 'ref'

2006-08-25 Thread Larry Wall
On Fri, Aug 25, 2006 at 02:04:01PM -0700, Trey Harris wrote: : In any case, Larry's settled this issue. Nah, I just handwaved it harder. :) Larry

Re: clarifying the spec for 'ref'

2006-08-25 Thread Larry Wall
On Fri, Aug 25, 2006 at 01:25:23PM -0700, Trey Harris wrote: : I think Larry nailed it with his observation about the difference between : class and role and trait. 'Constant' is a trait of another type, not a : type into itself. Hmm, well, there are several hands to be waved here. First,

Re: clarifying the spec for 'ref'

2006-08-25 Thread Luke Palmer
On 8/25/06, Mark J. Reed [EMAIL PROTECTED] wrote: Why not? Is it any weirder than simply changing that functionality beyond recognition? You can always fake removing functionality even if the language doesn't actually support it. Yes, yes, of course. That is not the issue. We are trying to

Re: clarifying the spec for 'ref'

2006-08-25 Thread Luke Palmer
On 8/25/06, Daniel Hulme [EMAIL PROTECTED] wrote: That's because you're used to one way of thinking about class inheritance: that the subclass can do everything that the superclass can do, and more. In this scheme, you might have a Square class, with a field representing its corner and another

Re: Same-named arguments

2006-08-25 Thread Luke Palmer
On 8/25/06, Michael Snoyman [EMAIL PROTECTED] wrote: I asked this same question on perl6-users, but no one really seemed to have a definitive answer, so please forgive me for reasking. I was wondering how named arguments would work when parameters of different types had the same name, ie sub

feedback on the draft documentation spec

2006-08-25 Thread Mark Stosberg
Perl6::Spec::Documentation is a draft spec for documentation formats for use with Perl6. My own reading of it is that POD still exists and is supported, while a new wiki-like format kwid is added, and a framework for various dialects is supported. POD was successful for its simplicity. It was