Post Reply 
thread repost: Discussion on Parser/UI Options
04-05-2014, 08:56 PM
Post: #13
RE: thread repost: Discussion on Parser/UI Options
(04-05-2014 03:34 AM)Manolo Sobrino Wrote:  
(04-04-2014 09:06 PM)Han Wrote:  No, it doesn't. It only knows that y is defined to be x.

Now we are nitpicking, well, it knows that y <- x, (what is exactly the type of the answer? Is it a text string?)

Actually, it is not nitpicking when you think about it in terms of programming. Let's just say that when you type y:=x; that the system automatically treats y and x identically. What happens, then, when you want to only change y, and not x? If you change y to a value of 1, then because y and x are now identical (since y is "the same" as x now), x becomes 1 as well -- which is undesirable in many cases. In other words, there one must purge x (and/or y) before changing the value of y. The type depends on whether you use TYPE or type.

Quote:I was just giving an example of a CAS that has implied multiplication. They went for brackets for function values, and that is a great thing for consistency, because using parentheses is just a typographic ambiguity that context resolves, even when they are used for wildly different things. When you give instructions to a computer it is a very good idea to establish the set of arguments of a function with a different syntax than that of a vector, an open interval, or a particular order of operations.

As I said, I think it's a personal choice. IMO it's just that most people are used to environments that understand both 2(1+2) and 2*(1+2), it's no big deal really.

The bracket notation is inconsistent with many other languages/CAS in which a[i] refers to the i-th entry of a vector. The point is that we as humans are completely capable of deciding whether a(i) refers to the i-th entry of a list or vector, a function named a whose input variable is i, or the product of a and i -- merely based on context clues. Even so, someone just learning about functions might not necessarily see the difference so clearly. What you are asking for is a CAS that is able to infer as well as a human -- not an easy order to fill. Maple, for example, does not allow implicit multiplication. Sure, when the operands are pure numbers it may be apparent. However, once you allow it for numbers people will naturally wonder about variables. As a simple example, is xy the variable named xy, or is that a product?

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: thread repost: Discussion on Parser/UI Options - Han - 04-05-2014 08:56 PM



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