Hi all?
I am an electrical engineer who has recently learnt Swift for a new project.
I know Swift is an OO language but I can't resist making comparisons to other languages I have used previously in science and academia.
The applications I am writing relies heavily on mathematics and I really wish Swift had more built in support for basic mathematical constructs.
I was very disappointed to see Apple reserving the ^ keyword for a bitwise operation (XOR) rather than a power function as is pretty standard elsewhere.
If I could have one built in function added to Swift it would be the Power function using preferably the ^ keyword.
After that, why not throw in the basic trigonometric functins too? Would that be too much to ask? I don't condone bloating Swift by adding every single mathematical function in existance, just a few of these basics to make the easy stuff a whole lot quicker and more portable.
Yes I know you can use overload operators and subscripts, but this just adds more custom code which kills any portability of your core mathematics.
A far better solution would be to provide language level support for these basic mathematical constructs.
Is there any way of contacting the language development group to give feedback about improved built-in support for mathematical equations?
Yes I know you can link to other classes that provide these functions (and I'm not expecting MATLAB like readability from Swift) but if just linking in the functionality is your answer then you really must not do very much technical computing because writing out complex mathematics using objects and .syntax is a nightmare for productivity and readability.
If anyone can help me get in touch with the language development group, I will be happy to provide examples of what I am talking about.
I am the only one with these feelings about Swift?
Cheers,
Paul