Date
1 - 6 of 6
"Polymorphic" in OSL manual
Blair Zajac <bl...@...>
Hey guys,
Reading through the OSL manual, on page 20 there's this paragraph: """Functions may be polymorphic. That is, multiple functions may be defined to have the same name, as long as they have differently-typed parameters, so that when the function is called the list of arguments can disambiguate which version of the function is desired.""" In C++ terminology, do you mean overloaded? Polymorphic to me means that the function takes a type parameter, or is a templated function. Regards, Blair |
|
Larry Gritz <l...@...>
I believe you are correct. Polymorphism should refer to types, what I was talking about is really "overloading."
-- lg On Feb 1, 2010, at 10:46 AM, Blair Zajac wrote: Hey guys,-- Larry Gritz l...@... |
|
Iliyan <iliyan....@...>
I think one of the reasons for this extensive explanation was meant to
toggle quoted message
Show quoted text
make the point that functions cannot be overloaded only by return type, in contrast to RSL :) This, along with many other "restrictions" of OSL, makes sense, I'd argue. On Feb 1, 7:54 pm, Larry Gritz <l...@...> wrote:
I believe you are correct. Polymorphism should refer to types, what I was talking about is really "overloading." |
|
Larry Gritz <l...@...>
RSL and OSL both are able to overload functions by return type.
So, do the terminology purists out there think that this makes it "polymorphic" or merely "overloaded"? -- lg On Feb 1, 2010, at 1:43 PM, Iliyan wrote: I think one of the reasons for this extensive explanation was meant to-- Larry Gritz l...@... |
|
Blair Zajac <bl...@...>
Reading these two
toggle quoted message
Show quoted text
http://en.wikipedia.org/wiki/Type_polymorphism http://www.haskell.org/haskellwiki/Ad-hoc_polymorphism suggests that what OSL provides is ad-hoc polymorphism, or otherwise known as overloading. I guessing adding "ad-hoc" or changing to "overloaded" would be fine, though I think the later is more familiar. I know if I saw "ad-hoc polymorphism" I would Google it. Blair On 02/01/2010 01:49 PM, Larry Gritz wrote:
RSL and OSL both are able to overload functions by return type. |
|
Larry Gritz <l...@...>
"polymorphic" appears exactly once in the docs, I have changed to "overloaded." No biggie.
On Feb 1, 2010, at 4:52 PM, Blair Zajac wrote: Reading these two-- Larry Gritz l...@... |
|