Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


Options
Go to last post Go to first unread
Offline Davide Carpi  
#1 Posted : 01 June 2012 17:35:40(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,647
Man
Italy
Location: Italy

Was thanked: 1329 time(s) in 875 post(s)
Hi,

just an idea... implicit assignments for equations (f.e. in PHP is widely used)

implicit assignments


regards,

w3b5urf3r
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects

Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

Offline oscampo  
#2 Posted : 01 June 2012 18:09:15(UTC)
oscampo


Rank: Advanced Member

Groups: Registered
Joined: 10/12/2009(UTC)
Posts: 246
Man
Colombia
Location: Cali, Colombia

Was thanked: 85 time(s) in 65 post(s)
It would be very useful
Offline omorr  
#3 Posted : 01 June 2012 18:09:47(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

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!"
Offline Davide Carpi  
#4 Posted : 01 June 2012 20:47:00(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,647
Man
Italy
Location: Italy

Was thanked: 1329 time(s) in 875 post(s)
Hello omorr Good

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 Good


regards,

w3b5urf3r
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
Offline Andrey Ivashov  
#5 Posted : 02 June 2012 02:28:31(UTC)
Andrey Ivashov


Rank: Administration

Groups: Developers, Registered, Knovel Developers, Administrators, Advanced Member
Joined: 11/07/2008(UTC)
Posts: 1,616
Man
Russian Federation

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 Go to Quoted Post
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 Good

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.
thanks 1 user thanked Andrey Ivashov for this useful post.
on 02/06/2012(UTC)
Offline omorr  
#6 Posted : 02 June 2012 08:44:19(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
Helo Andrey,

I am very glad that you are taking this into account Good . 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!"
Users browsing this topic
Guest
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.