On 11/13/2013 11:13, Bahman Movaqar wrote: > Let's say I have a method with signature in a language like Java as below: > gregorianDayToJulianDay(year, month, day) > > What could be a proper naming for this method in Smalltalk? I'm a bit > confused as I'm so used to the concept of methods being "verbs" which > accept some arguments. > > I'd appreciate any help/idea.
After reading Joachim's reply, I guess I have to explain a bit more:
I'm writing class that converts dates between Gregorian and Iranian
(a.k.a. Jalali) calendars. So the design I have (coming from a
verb-based perspective) is as follows:
<pseudo-design>
class: IranianCalendarConverter
"The only methods users should ever need to use"
class-side: GregorianToIranian(year, month, day) -> returns an
integer array (y, m, d)
class-side: IranianToGregorian(year, month, day) -> returns an
integer array (y, m, d)
"Internal methods used for calculation"
class-side: IranianDateToJulianDay(year, month, day) -> returns an
integer --Julian day
class-side: JulidanDayToGregorianDate(day) -> returns an integer
array (y, m, d)
class-side: GregorianDateToJulianDay(year, month, day) -> returns an
integer --Julian day
class-side: JulidanDayToIranianDate(day) -> returns an integer array
(y, m, d)
</pseudo-design>
Each of these methods contain about 10-30 lines of code.
--
Bahman Movaqar (http://BahmanM.com)
ERP Evaluation, Implementation & Deployment Consultant
PGP Key ID: 0x6AB5BD68 (keyserver2.pgp.com)
signature.asc
Description: OpenPGP digital signature
