2009/5/21 William Stein <wst...@gmail.com>: > > 2009/5/21 Jason Grout <jason-s...@creativetrax.com>: >> >> Referring to http://trac.sagemath.org/sage_trac/ticket/6094 ... >> >> I hope this isn't too much bikeshedding [1]... >> >> Suppose a function has several ways to do its calculation, and wants to >> provide the user with a way to select between the different ways. >> >> What is the standard option name to select between the different ways? >> >> (a) my_function(algorithm='some way') >> (b) my_function(method='some way') >> (c) another option >> (d) there is no standard; different functions use different option names. >> >> If (a) or (d) is the answer, might I suggest that using 'method' instead >> of 'algorithm' is better because: > > The answer is (a). I see no reason to change. > Also, "method" is the standard programming term to refer to a member function > of a class. Hence "algorithm" is much less ambiguous. >
I agree. In fact, since it had never occurred to me to use "method" in this context I at first assumed you meant method is in member function and got confused. If students are advanced enough to be shown that there is more than one way of doing something, surely they can be told the correct word. (Aren't these the same students who we have to teach about "integration", "differentiability", "homeomorphism" and so on?!) However sometimes I have felt that "algorithm" did not quite capture the distinction being made for some function. I have written functions in Sage which have an algorithm parameter which can be either "pari" or "sage", where the underlying algorithm is in fact the same, but we are choosing to use one implementation of it instead of another. I could try arguing for the use of "implementation" as the name of the parameter... but "algorithm" will do fine. John > William > >> >> (1) it is easier to spell (which unfortunately makes a big difference >> to some of our undergraduates!) >> (2) it is easier to say >> (3) it is shorter >> (4) because of 1-3, it is easier to remember >> >> Of course, if using 'algorithm' is the long-set standard, then its >> inertia may make this suggestion impractical. > > >> >> Thanks, >> >> Jason >> >> [1] http://www.bikeshed.com/ or >> http://en.wikipedia.org/wiki/Color_of_the_bikeshed >> >> -- >> Jason Grout >> >> >> > >> > > > > -- > William Stein > Associate Professor of Mathematics > University of Washington > http://wstein.org > > > > --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---