Post Reply 
50g System RPL list processing
10-29-2014, 01:31 PM (This post was last modified: 10-29-2014 01:54 PM by Gilles.)
Post: #9
RE: 50g System RPL list processing
(10-29-2014 12:20 PM)Claudio L. Wrote:  (...)
My point exactly. An empty list is an empty list. What makes you think the sum should be a real number 0? why not an empty string? why not a zero vector with 2 components? or 3 components? or a NxN zero matrix?
There's no way of knowing what the list would've contained if it wasn't empty, so the result should be an error, you can't determine what the result should be (it has to be the null vector in the same vector space of a list full of items, be it matrices, vectors, scalars or any other object, but which one?).
returning NULL is about the same as an error (the user has to catch it or prevent this condition or their code will likely fail), except the concept of NULL is not defined in RPL (perhaps should be nil like in LISP?) so it would feel like a weird quirk of just one set of functions, rather than a feature of the language (like nil is in LISP).

OK Claudio, I agree with you. It's the best option.

I want to say that i was very happy when I discovered the new RPL project Big Grin RPL still alive !
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: 50g System RPL list processing - ttw - 06-21-2014, 02:13 AM
RE: 50g System RPL list processing - Han - 10-28-2014, 05:06 PM
RE: 50g System RPL list processing - Gilles - 10-29-2014 01:31 PM
RE: 50g System RPL list processing - Han - 10-31-2014, 02:15 PM
RE: 50g System RPL list processing - Han - 11-01-2014, 08:34 PM
RE: 50g System RPL list processing - Han - 11-02-2014, 01:04 AM
RE: 50g System RPL list processing - Han - 11-01-2014, 08:31 PM
RE: 50g System RPL list processing - Han - 11-02-2014, 06:26 PM



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