grzegorzmazur / yacas

Computer calculations made easy
http://www.yacas.org
GNU Lesser General Public License v2.1
126 stars 24 forks source link

Length(a) failure #317

Open Isomorph70 opened 4 years ago

Isomorph70 commented 4 years ago

Test with Verify(Length(a),Length(a));

For an unknown variable 'a' the expression Length(a) should evaluate to Length(a).

After looking in the documentation, I realize it might have to do with native functions. But I think it is very important to be able to use symbolic values in a computer algebra system, that why I use them.

I will suggest we rename native functions, by putting a letter in front of names, like FLength for fast Length, and then make a rule. Length(l_IsList) <-- FLength(l);

If someone really need the speed then they can still use the F functions. And now all function can handle unknown variables the same way. (except the F functions):

grzegorzmazur commented 4 years ago

Right, it makes sense. And I think that the user doesn't really care if it's a native function or not. So i think that renaming the current Length() to Builtin'Length() and providing higher level Length() on top of it would work. Thanks!