Steve Wampler wrote:

> Not really.  I came up with:
>
Both solutions (buffer build and test) or using test for mod 15 are popular. I 
guess it's the nature of the problem that it can't be simpler. I think, to 
implement my fuzzy idea of a sussinct solution, Icon needs an OR type operator 
that does not short-circuit. One we don't have directly; therefore coding one 
would make the solution larger...

> But none are particularly appealing.  I guess I have a slight preference
> for the last [compacted version of 15-tester]
>
cf. my compacted version which addresses the buffer building approach. I guess 
we have 4 possible solutions over two designs.

Although it's a simple problem and solution, my concern, and it would apply to 
a lot of solutions, is that we don't make (Un)Icon look cryptic and obtuse by 
artificially chasing one liners. It's a common delusion that line count is the 
only criteria worth using to judge power and simplicity.

Personally I don't find crushed one-liners that clever, as Dave illustrated by 
pointing out the APL and J solutions. I can understand the APL (slowly) 
because I used it 25 years ago (the way other kids played with TRS-80's, how 
tragic am I?) but the J has me bamboozled despite being (apparently) an 
evolution of APL.

We should avoid APL syndrome at all costs!




------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Unicon-group mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/unicon-group

Reply via email to