Re: Bag / Set ideas - making them substitutable for Arrays makes them more useful
On Sun, Nov 14, 2010 at 12:12 AM, Jon Lang datawea...@gmail.com wrote: Carl Mäsak wrote: Jonathan Lang (): That saves a singlr character over Bag( ... ) and Set( ... ), respectively (or three characters, if you find decent unicode bracket choices). It still wouldn't be a big enough deal to me to bother with it. +1. Let's leave it at that. That said, I do think that Bag( ... ) should be able to take pairs, so that one can easily create a Bag that holds, say, twenty of a given item, without having to spell out the item twenty times. Doesn't the xx operator cover this? Eirik
Re: [perl6/specs] b578b5: Distinguish listy ords/chrs from ord/chr
On Fri, Dec 10, 2010 at 6:10 PM, nore...@github.com wrote: Branch: refs/heads/master Home: https://github.com/perl6/specs Commit: b578b580a3e219efc829bb723db457566c2f07e0 https://github.com/perl6/specs/commit/b578b580a3e219efc829bb723db457566c2f07e0 Author: TimToady la...@wall.org Date: 2010-12-10 (Fri, 10 Dec 2010) Hmmm ... [...] multi sub chrs( Int *...@grid -- List of Char ) [...] Cchrs takes zero or more integer grapheme ids and returns the corresponding characters as a string. [...] Is a CList of Char a string now? If the return value always Cdoes Str, the return type should reflect that, no? (I assume CList of Char on its own does not; a dangerous practice?) OTOH, if it is not the case that this string necessarily Cdoes Str, it seems an interesting distinction to make – one that could stand to be expounded upon? :) Eirik
Re: Language design
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 seems to require a nondeterministic algorithm in order to be of practical use. Rats means never having to worry about inaccurate float representations. $ perl -E '$i+=0.1 for 0..1000; say for $i, $i cmp 100.1' # oops … 100.0999 -1 $ perl6 -e 'my $i; $i+=0.1 for 0..1000; .say for $i, $i cmp 100.1' 100.1 Same $ Float inaccuracy is one of the things I'm really looking forward to forgetting. :) Eirik
Re: Language design
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 did, why would I prefer getting the wrong answer faster? Eirik