« Return to Thread: getter / setter questions

Re: getter / setter questions

by Michael Wohlwend :: Rate this Message:

Reply to Author | View in Thread

Am Wednesday 08 July 2009 11:16:41 schrieb Ricky Clarkson:
> I think it's reasonably obvious that bar isn't the name of a setter for
> foo.

a setter can be just some function, like written here:
on page 392 and 393 of the "Programming in Scala" book there is an example
where they define conversion functions to and from fahrenheit to and from
celsius with a getter and a setter function. This looked to me like I can
choose the names for getters and setters arbitray. But maybe just my english
sucks and I understood something which isn't there :-)

cheers
 Michael

 « Return to Thread: getter / setter questions