1 страниц (6 вхождений)
implicit assignments in functions - Сообщения
#1 Опубликовано: 01.06.2012 10:35:40
Hi,
just an idea... implicit assignments for equations (f.e. in PHP is widely used)

regards,
w3b5urf3r
just an idea... implicit assignments for equations (f.e. in PHP is widely used)
regards,
w3b5urf3r
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#2 Опубликовано: 01.06.2012 11:09:15
It would be very useful
#3 Опубликовано: 01.06.2012 11:09:47
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
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!"
#4 Опубликовано: 01.06.2012 13:47:00
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

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 please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#5 Опубликовано: 01.06.2012 19:28:31
It's a very interesting idea! I'm serious! Thank you [USERLINK]w3b5urf3r_reloaded[/USERLINK].
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.
WroteI 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 пользователям понравился этот пост
Davide Carpi 02.06.2012 08:23:00
#6 Опубликовано: 02.06.2012 01:44:19
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
I am very glad that you are taking this into account

Hope that I was right about all of this.
Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
1 страниц (6 вхождений)
-
Новые сообщения
-
Нет новых сообщений