Rank: Advanced Member Groups: Registered, Advanced Member Joined: 13/01/2012(UTC) Posts: 2,652 Location: Italy Was thanked: 1339 time(s) in 878 post(s)
|
Hi, just an idea... implicit assignments for equations (f.e. in PHP is widely used) regards, w3b5urf3r |
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects |
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 10/12/2009(UTC) Posts: 249 Location: Cali, Colombia Was thanked: 87 time(s) in 66 post(s)
|
|
|
|
|
Rank: Administration Groups: Registered, Advanced Member Joined: 23/06/2009(UTC) Posts: 1,740 Was thanked: 318 time(s) in 268 post(s)
|
Hello w3b5urf3r,
Some similar idea crossed my mind some time ago. But there might be a problem regarding this. SMath can have the same name for different functions differentiating in different number of arguments. Number of arguments is the way to use the right one. Therefore, if you say f(3) and f(3,2) these are calls to two different functions. How then to apply your idea about implicit assignments? Could this be possible, or confusing maybe?
I hope I made myself understood.
Regards, Radovan |
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!" |
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 13/01/2012(UTC) Posts: 2,652 Location: Italy Was thanked: 1339 time(s) in 878 post(s)
|
Hello omorr I understand, you're right... I had not realized until now that functions have this behavior... I have no idea, it seems that the two behaviors are completely in conflict; if so, I think that should be discriminating which of two options is more used / usable, and therefore should be abolished completely the possibility of developing the other option (provided that this does not involve a deep rewriting of the SMath code)... I personally think that when you define a new function with the same name and different arguments, you have simply redefined the function (like any variable), but it's just my opinion regards, w3b5urf3r |
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects |
|
|
|
Rank: Administration Groups: Developers, Registered, Knovel Developers, Administrators, Advanced Member Joined: 11/07/2008(UTC) Posts: 1,616 Was thanked: 1978 time(s) in 666 post(s)
|
It's a very interesting idea! I'm serious! Thank you w3b5urf3r_reloaded. Originally Posted by: w3b5urf3r_reloaded I personally think that when you define a new function with the same name and different arguments, you have simply redefined the function (like any variable), but it's just my opinion Agree with you. So I don't see any conflict here. I will think about possibility to implement this feature in nearest future. Best regards, Andrey Ivashov.
|
1 user thanked Andrey Ivashov for this useful post.
|
|
|
Rank: Administration Groups: Registered, Advanced Member Joined: 23/06/2009(UTC) Posts: 1,740 Was thanked: 318 time(s) in 268 post(s)
|
Helo Andrey, I am very glad that you are taking this into account . Now, it crossed my mind some other things. If I understood you well, you are thinking of changing SMath behavior about function naming. That might mean that there would be no f(x) and f(x,y) regarded as two different functions. We could use only one of them and It will depend which one was defined last and that would be used. Am I right? On the other hand, I suppose that there would be no more situation of having the same name of variable and function, actually "f" and "f()". If that is the case, I think it would make the things less complicated. I remember that you have had problems of how to use functions as function arguments. Now, it is a bit complicated. We can not simply put a function name, we must put some dummy arguments as well in order to distinguish which function was used. Just look at the Jacob() or roots() for instance. I suppose that if you forbid the same name of variables and functions, you could simply put the function name as the function argument without conflicting with other variables or functions, which would be less complicated - I think. Hope that I was right about all of this. Regards, Radovan |
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!" |
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.