On Thu, Aug 11, 2011 at 3:31 PM, Jim Jewett jimjjew...@gmail.com wrote:
On Thu, Aug 11, 2011 at 5:22 PM, Jason Moore moorepa...@gmail.com wrote:
Couple more thoughts on operator overloading.
... The outer product
doesn't really have a symbol on the keyboard. It often uses an x with a
circle
My Summer of Code project is writing a submodule of SymPy for creation of
symbolic equations of motion for multibody systems. As part of this, I've
implemented classes to represent vectors and dyadics. I have currently
implemented three ways to do mathematical operations on vectors: an
operator, a
I personally like the functions, dot(a,b), etc... and would be sad to see
them left out. If you had to kick one I would get rid of the object oriented
syntax a.dot(b). This is just a personal preference though.
It seems to me though that Python is all about having several overlapping
syntaxes
I ran this same question by my girlfriend who teaches undergraduate
physics classes. She isn't an experienced programmer, so concepts of
operator overloading and object oriented vs functional programming
styles are not on here mind, but she has taught a lot of the core
required physics classes to
I'm for the functional names as it is how all the programming languages that
I know of implement dot products and cross products. It is clear what they
mean and the symbols we use in math for the dot product and cross product (a
dot and a cross) do not exist explicitly on the key board. Secondly,
FYI: there is a lot of stuff on the subject we've already typed here:
https://github.com/sympy/sympy/pull/450#issuecomment-1782199
For the sake of retyping.
On Thu, Aug 11, 2011 at 1:15 PM, Jason Moore moorepa...@gmail.com wrote:
I'm for the functional names as it is how all the programming
One comment below.
On Thu, Aug 11, 2011 at 1:15 PM, Jason Moore moorepa...@gmail.com wrote:
I'm for the functional names as it is how all the programming languages that
I know of implement dot products and cross products. It is clear what they
mean and the symbols we use in math for the dot
Thanks for the link Jason, there is some good discussion there which it
would be optimal to not have to repeat.
My opinion after reading through that is as follows.
I like operators. If the language supports it and you can find a good set
they really do make writing code feel more like writing
Couple more thoughts on operator overloading.
Let's assume the '+' symbol means 'to add' in the language of choice. It is
very clear that what adding two numbers should do, but what about other
objects:
object = matrix
'+' should add the matrix. we could write a function called 'add_matrix',
On Thu, Aug 11, 2011 at 5:22 PM, Jason Moore moorepa...@gmail.com wrote:
Couple more thoughts on operator overloading.
... The outer product
doesn't really have a symbol on the keyboard. It often uses an x with a
circle around it. Same with cross...the 'x' would be the best choice, but
our
I agree with Jason that coercing operators to perform unfamiliar tasks is
probably a poor choice. I disagree however that operators have only a single
meaning or that they should be avoided when their meaning might be
ambiguous.
Example of the first (operators have only a single meaning)
also
I chose the to represent dot product specifically because of its
meaning of and/interection in Python; that is how I view the dot
product of two vectors, as the common component between two vectors. I
decided to only use * for scalar multiplication, to further reinforce
that operations between
On Fri, Aug 12, 2011 at 4:29 AM, Gilbert gede gilbertg...@gmail.com wrote:
I chose the to represent dot product specifically because of its
meaning of and/interection in Python; that is how I view the dot
product of two vectors, as the common component between two vectors. I
decided to only
13 matches
Mail list logo