Alias, namespace, overloading for functions

Alias, namespace, overloading for functions - @Air provides thermodynamic properties and transport properties of moist air. - Messages

#1 Posted: 8/29/2013 4:45:11 AM
Вячеслав Мезенцев

Вячеслав Мезенцев

1402 likes in 1708 posts.

Group: Moderator

1. Suggest to make support for aliases for complex function names. If the user has entered an alias, then show it instead of the function name.
Quote


2
alias="Ai">gslsfAi


2. Add namespace support for functions with the same signature, but located in different plugins.
Quote


2
namespace="GSL">gslsfAi


3. Suggest to distinguish functions with different types of parameters: smath::abs([RealNumber]), gsl::abs([Matrix]), ...

4. Add a function type with variable number of arguments: ArgumentSections::VarArgs.
Russia ☭ forever, Viacheslav N. Mezentsev
#2 Posted: 8/29/2013 8:28:32 AM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

Wrote

1. Suggest to make support for aliases for complex function names. If the user has entered an alias, then show it instead of the function name.

Quote


2
alias="Ai">gslsfAi


What would be the difference compared to writing Ai(x#):=fslsfAi(x#) (perhaps in a closed area region)? What would the user do to enter an alias, and where?

In the case of abs() I would prefer to have a function as generic as possible, i.e. that they can handle reals, complex or matrices. If different algorithms are required, the function may choose the correct one. The opposite extreme is to have flavours of functions for integer, single, double precision etc.
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
  • New Posts New Posts
  • No New Posts No New Posts