[Grace-core] Cross platform graphics library

Kim Bruce kim at cs.pomona.edu
Tue Jan 28 15:28:52 PST 2014


> 
> Semi agree. I guess it's debatable. From a math point of view I would prefer to see something like:
> 
> sin( [big equation here] )
> 
> as that is how math is read, rather than something like:
> 
> def v = [big equation here]
> v.sin
> 
What are our restriction on defining prefix methods?  Do they need to be symbolic or could we make sin prefix?  (I suspect we can't because of parsing issues, but maybe?)

Of course we could also gather math operators together in a module so one has the choice of writing either
exp.sin
or
math.sin(exp)

I'm not sure I have a strong preference, but I do feel it is nice to have the standard math operations available in the number class.  I.e., if you forced me to choose, I'd probably choose the first.

Kim




More information about the Grace-core mailing list