Post Reply 
[SOLVED] DSRN (dog slow roman numerals)
06-15-2014, 09:30 PM
Post: #40
RE: DSRN (dog slow roman numerals)
(06-15-2014 11:49 AM)Claudio L. Wrote:  The real question to ask is "Why should I look at it that way?"
You don't have to. However it shows consistency of ΣLIST and ΠLIST with STREAM.

I agree with you that the current implementation violates the principle of least surprise. It not only tripped David but me as well. But trying to understand doesn't mean I prefer the current implementation.

Besides this I was also surprised by the FOR-loop: why is the loop executed at least once even when finish < start?

In both cases I guessed corner cases wrong. Most probably because I'm more familiar with other languages than RPL.

Quote:The sum of a list of strings is a string, so the empty list should give an empty string, not a number.
Besides the violation of the commutative property this is another reason why + shouldn't be overloaded for string concatenation: 0 is not a neutral element.

Thinking about it a little more maybe providing foldl, foldr and filter similar to Haskell would be more beneficial than trying to fix the behavior of existing functions.

You may not agree with the Linux way: never ever break user experience. But I think there is truth in the following quote:
Quote:The biggest thing any program can do is not the technical details of the program itself; it’s how useful the program is to users.

Kind regards
Thomas
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: DSRN (dog slow roman numerals) - HP67 - 06-11-2014, 07:06 PM
RE: DSRN (dog slow roman numerals) - HP67 - 06-12-2014, 11:44 AM
RE: DSRN (dog slow roman numerals) - HP67 - 06-12-2014, 04:49 PM
RE: DSRN (dog slow roman numerals) - HP67 - 06-15-2014, 12:02 PM
RE: DSRN (dog slow roman numerals) - HP67 - 06-16-2014, 06:09 AM
RE: DSRN (dog slow roman numerals) - HP67 - 06-12-2014, 05:46 PM
RE: DSRN (dog slow roman numerals) - Thomas Klemm - 06-15-2014 09:30 PM



User(s) browsing this thread: 1 Guest(s)