[SOLVED] DSRN (dog slow roman numerals)
|
06-15-2014, 10:08 PM
Post: #42
|
|||
|
|||
RE: DSRN (dog slow roman numerals)
(06-15-2014 07:29 PM)Thomas Klemm Wrote:(06-15-2014 06:48 PM)Claudio L. Wrote: What would be a down side in your opinion? We are on the same page, here. But that's not a downside of overloading operators, it's just a bad choice! newRPL already has the '+' operator working on lists by adding element by element. The ADD command will concatenate lists. And for what is worth, I don't have a problem with making '+' fail for strings and have ADD or CONCAT, etc. to concatenate strings. That's actually the beauty of overloading operators, you can make them do whatever you want. Actually, thanks to "proper" overloading of the '+' operators for lists, doing things like MAP, with nested lists is a breeze, just apply the same '+' operator recursively to all elements, whether they are lists or not. It's already done and working fine. The resulting code is surprisingly clean, so I was wondering what the downsides are (I'm still wondering). Claudio |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)