Synopsis 02: Range objects

2009-08-24 Thread Michael Zedeler
.html Regards, Michael Zedeler.

Re: Synopsis 02: Range objects

2009-08-25 Thread Michael Zedeler
James Cloos wrote: Michael == Michael Zedeler mich...@zedeler.dk writes: Michael The Range 1.0001 .. 2.15 makes sense as an interval definition, but Michael there can hardly be a useful list definition without defining a step Michael size, at least, making it possible to use step

Re: Synopsis 02: Range objects [recap]

2009-08-26 Thread Michael Zedeler
the Range operator (..). Next open question: What about Ranges using different types in each endpoint? 1.5 .. 10 :by(0.5) (Rat .. Int) 0 .. 7 Should they be coerced - and in that case to what? If we don't coerce them, what should be returned? Regards, Michael Zedeler.

Re: Synopsis 02: Range objects [recap]

2009-08-27 Thread Michael Zedeler
Jon Lang wrote: Michael Zedeler wrote: Proposed changes: It shouldn't be possible to construct RangeIterators over Str (apart from single length strings) or Complex using the Range operator (..). I'd go one step further with Complex, to say that Range isn't a useful concept at all so

Re: Synopsis 02: Range objects

2009-08-27 Thread Michael Zedeler
Karl Brodowsky wrote: Michael Zedeler schrieb: Well... maybe. How do you specify the intended precision, then? If I want the values from 1 to 2 with step size 0.01, I guess that writing 1.00 .. 2.00 won't be sufficient. Trying to work out the step size by looking at the precision of things

Re: generality of Range

2009-10-04 Thread Michael Zedeler
Hi Darren. Darren Duncan wrote: In a project of mine I'm looking to use Perl 6 Range values to represent continuous interval values in the most generic manner possible, meaning that the endpoint values could literally be of any type at all. [...] for a realistic example: my $a = ['Foo',

Re: r28597 - docs/Perl6/Spec/S32-setting-library

2009-10-04 Thread Michael Zedeler
Moritz Lenz wrote: Jon Lang wrote: How do pred and succ work when given Complex values? By adding/substracting 1 from the real part, I'd say. Don't know if that actually makes sense. It doesn't, because succ should always give the next, smallest possible element given some ordering

Re: r28597 - docs/Perl6/Spec/S32-setting-library

2009-10-12 Thread Michael Zedeler
David Green wrote: On 2009-Oct-4, at 2:07 pm, Moritz Lenz wrote: Michael Zedeler wrote: It doesn't, because succ should always give the next, smallest possible element given some ordering relation. Where's that definition from? The dictionary. =) It would be confusing to have a successor

Domains? [Re: r28597 - docs/Perl6/Spec/S32-setting-library]

2009-10-13 Thread Michael Zedeler
yary wrote: ... Also, the domain should define how to compare objects and could provide details about whether the set is finite, countable or uncountable. ... Sounds like a role Domain that provides methods (off the top of my head)- ordering - returns Nil if the domain is unordered,

Re: Suggested magic for a .. b

2010-07-16 Thread Michael Zedeler
On 2010-07-16 18:40, Aaron Sherman wrote: Oh bother, I wrote this up last night, but forgot to send it. Here y'all go: I've been testing .. recently, and it seems, in Rakudo, to behave like Perl 5. That is, the magic auto-increment for a .. z works very wonkily, given any range that isn't

Re: Suggested magic for a .. b

2010-07-27 Thread Michael Zedeler
On 2010-07-27 23:50, Aaron Sherman wrote: PS: On a really abstract note, requiring that ($a .. $b).reverse be lazy will put new constraints on the right hand side parameter. Previously, it didn't have to have a value of its own, it just had to be comparable to other values. for example: for

Re: Suggested magic for a .. b

2010-07-28 Thread Michael Zedeler
On 2010-07-28 06:54, Martin D Kealey wrote: On Wed, 28 Jul 2010, Michael Zedeler wrote: Writing for ($a .. $b).reverse - $c { ...} may then blow up because it turns out that $b doesn't have a .succ method when coercing to sequence (where the LHS must have an initial value), just like

Re: Suggested magic for a .. b

2010-07-28 Thread Michael Zedeler
On 2010-07-29 00:24, Dave Whipp wrote: Aaron Sherman wrote: On Wed, Jul 28, 2010 at 11:34 AM, Dave Whipp d...@dave.whipp.name wrote: To squint at this slightly, in the context that we already have 0...1e10 as a sequence generator, perhaps the semantics of iterating a range should be

Re: Suggested magic for a .. b

2010-07-28 Thread Michael Zedeler
On 2010-07-29 01:39, Jon Lang wrote: Aaron Sherman wrote: In smart-match context, a..b includes aardvark. No one has yet explained to me why that makes sense. The continued use of ASCII examples, of course, doesn't help. Does a .. b include æther? This is where Germans and Swedes, for

Re: Suggested magic for a .. b

2010-07-28 Thread Michael Zedeler
On 2010-07-29 02:19, Jon Lang wrote: Michael Zedeler wrote: Jon Lang wrote: This is definitely something for the Unicode crowd to look into. But whatever solution you come up with, please make it compatible with the notion that aardvark..apple can be used to match any word

Re: Breaking encapsulation by detaching a private-variable-accessing method from one object and calling it on another

2010-08-03 Thread Michael Zedeler
On 2010-07-31 20:23, Carl Mäsak wrote: * Today we discovered that it's possible to break encapsulation by detaching a method from an object of one class, and calling that method on an object of another class. Which means that breaking the encapsulation of a foreign class is as easy as creating a

Re: Encapsulating the contents of container types

2011-08-20 Thread Michael Zedeler
On 2011-08-20 12:02, Damian Conway wrote: Carl asked: * What language components could be provided to put class implementors on the right path so that their classes end up encapsulated by default? Doing nothing should result in the safe behaviour (i.e. full encapsulation). You ought to have to

Re: [perl #121454] Can't inline complex constraints in multisub signatures

2014-03-31 Thread Michael Zedeler.
is counterproductive :-) ). In general - Perl (5) is a great tool because it doesn't force people to deal too much with typing (both implicit and explicit). Lets keep it that way. -- Michael Zedeler 70 25 19 99 mich...@zedeler.dk mailto:mich...@zedeler.dk dk.linkedin.com/in/mzedeler http

Re: [perl #121454] Can't inline complex constraints in multisub signatures

2014-03-31 Thread Michael Zedeler.
On 2014-03-31 14:49, Michael Zedeler. wrote: On 2014-03-29 21:45, Damian Conway wrote: Moritz wrote: To spin the tale further, we need to think about what happens if somebody writes multi foo(1|2e0) { ... } so now we have Int|Num. We could explore the most-derived common ancestor (Cool

Re: New parrot feature: reset coros, or not? how to deal with dead coros

2014-10-15 Thread Michael Zedeler.
. Written by a seasoned user of a fair amount of programming languages. -- Michael Zedeler 70 25 19 99 mich...@zedeler.dk mailto:mich...@zedeler.dk dk.linkedin.com/in/mzedeler http://dk.linkedin.com/in/mzedeler/ | twitter.com/mzedeler https://twitter.com/mzedeler | github.com/mzedeler https

Re: Language design

2015-06-16 Thread Michael Zedeler
2015 at 10:32, Michael Zedeler mich...@zedeler.dk wrote: On 06/12/15 15:54, Parrot Raiser wrote: Has somebody been following the discussions on types? http://xkcd.org/1537/ :-)* Perl6 has something similar to example 9. Ranges, hyper-operators as well as the invocation operators

Re: Language design

2015-06-16 Thread Michael Zedeler
to be of practical use. Regards, Michael. Aristotle Pagaltzis wrote * Michael Zedeler mich...@zedeler.dk [2015-06-16 18:55]: For instance, why have Complex and Rat numbers in the core? If you're not working in a very specialized field (which probably *isn't* numerical computation

Re: Language design

2015-06-16 Thread Michael Zedeler
...and unpredictable performance is a cost you're willing to pay? M. The Sidhekin wrote On Tue, Jun 16, 2015 at 10:02 PM, Michael Zedeler mich...@zedeler.dk wrote: I'm not saying that there isn't any alternative to the way other languages implements floats, but Rats in particular

Re: Language design

2015-06-16 Thread Michael Zedeler
. It will be possible to just use a subset  On 16 June 2015 at 10:32, Michael Zedeler mich...@zedeler.dk wrote: On 06/12/15 15:54, Parrot Raiser wrote: Has somebody been following the discussions on types? http://xkcd.org/1537/ :-)* Perl6 has something similar to example 9. Ranges, hyper

The invocation operators .* and .+

2015-06-16 Thread Michael Zedeler
, .+), because I haven't seen just one reasonable use case for it. -- Michael Zedeler 70 25 19 99 mich...@zedeler.dk dk.linkedin.com/in/mzedeler | twitter.com/mzedeler | github.com/mzedeler

Re: The invocation operators .* and .+

2015-06-16 Thread Michael Zedeler
Hi Aristotle. On 06/16/15 12:24, Aristotle Pagaltzis wrote: * Michael Zedeler mich...@zedeler.dk [2015-06-16 11:35]: This is working exactly as specified in the synopsis, but does Perl 6 NEED anything like this? Just because something is possible doesn't make it an automatic requirement! Well

Re: Language design

2015-06-16 Thread Michael Zedeler
, Michael. -- Michael Zedeler 70 25 19 99 mich...@zedeler.dk dk.linkedin.com/in/mzedeler | twitter.com/mzedeler | github.com/mzedeler

Re: Language design

2015-07-13 Thread Michael Zedeler
Darren Duncan wrote On 2015-06-16 2:15 PM, The Sidhekin wrote: On Tue, Jun 16, 2015 at 10:52 PM, Michael Zedeler mich...@zedeler.dk wrote: ...and unpredictable performance is a cost you're willing to pay?     I don't write performance-critical applications, but even if I