Hi El sáb., 29 sept. 2018 a las 7:53, ToddAndMargo (<toddandma...@zoho.com>) escribió:
> Proposed addition to "words": > > "$limits" is an optional argument. When left empty, the > value defaults to Inf (Infinity), meaning "without bound" > or "no limit" > > Inf means without bonds _always_. It says so in the wikipedia definition you have used above. Proposed addition to "Inf": > > The value Inf (Infinity) represents "without bound" or > "no limit" (meaning "all possible values") when used > as an argument. > It means that when used as an argument, and when it's not used an argument, as in, that is what it is. It means without bonds when assigned to a variable, and when you see it sitting pretty in the middle of a long sentence. It _means_ that. > Inf when used as an instance of Num and represents a > value that's too large to represent in 64-bit double-precision > s floating point number > Not "when". Inf _is_ a Num. And it does not represent that. You can represent any number with double or simple precision, only, well, you'll lose some precision. > Oh my goodness gracious did you top yourself with Perl 6. I love > it. You are some kind of freaking genius that only occurs in humans > every 100 years of so. You do not want newcomers running screaming > in terror when they first see the documentation: "make simple things > complicated and the complicated ones impossible." > As in inserting a symbol like Infinity into a language so that when you want to use it as a loop bookend it never ends, no matter what happens? Or using Inf exactly by its meaning, "larger than anything". How do you do that in other languages? You do all kind of things. You can have a special constant, use 0 or -1 as limit (or some other impossible number which you have to interpret ad hoc), or simply have different signatures for with or without limits. How's that any simpler than using Infinity meaning no limits, and always meaning no limits? Perl 6 makes writing programs meaningful and expressive. That's achieved through clever language design, such as this simple thing. Cheers JJ