Problems? Is your data what you think it is? PerlMonks

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

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

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.

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

Replies are listed 'Best First'.
Re^4: Challenge: Simple algorithm for continuing series of integers (confidence)
by tye (Sage) 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

Create A New User
Node Status?
node history
Node Type: note [id://718230]
help
Chatterbox?
and a moth chases the moon...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2017-06-28 01:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
Voting Booth?
How many monitors do you use while coding?

Results (619 votes). Check out past polls.