Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^3: Challenge: Simple algorithm for continuing series of integers (confidence)

by blokhead (Monsignor)
on Oct 20, 2008 at 14:10 UTC ( #718230=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Challenge: Simple algorithm for continuing series of integers (confidence)
in thread Challenge: Simple algorithm for continuing series of integers

I agree, the magic-star should generally only identify a sequence that is nicely overspecified. But in the interest of Huffman coding the language I think that if anything warrants an exception, it should be arithmetic sequences (including constant sequences), since these would be the most common use cases (including 1,2,3,4...). Many times I've wanted to iterate over the multiples of N. I think "1,1,..*" or "2,4,6,..*" is just fine, and overspecifying the sequences by one more seems overkill because the rule is so simple/common.

blokhead


Comment on Re^3: Challenge: Simple algorithm for continuing series of integers (confidence)
Re^4: Challenge: Simple algorithm for continuing series of integers (confidence)
by tye (Cardinal) on Oct 20, 2008 at 15:53 UTC

    If I meant to write 1,2,4 but typo'd the "4" and wrote 1,2,3, then I would like to know about the typo. Having 1,2,4...* not work will help with that, but my experience is that people will expect 1,2,4...* to work because it will seem obvious while they are writing it (and I just typed "1,2,3" and had to delete the 3 and type 4).

    I figured there would be an exception for simple counting lists so that just "2 ... *" would be sufficient for "2,3,4,5 ... *". So 1,1...* vs 1.1...* would be another ugly typo that I would like detected. 100,101...* vs 100_101...*?

    So I respectfully disagree. But I figured it would be an up-hill fight against the common Perl mindset of making things rediculously terse.

    - tye        

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://718230]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2014-08-31 05:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (294 votes), past polls