benn has asked for the wisdom of the Perl Monks concerning the following question:
I'm about to plunge into some code to convert various musical note formats back and forth - "BB-" <->"Bb2" <->"bf3" etc. Looking around, I guess there are between 5 and 10 different formats that I'll eventually want to build in.
My problem is how to structure this. Possible options would appear to be...
One wrinkle is that different formats may require / return additional parameters - ABC format, for instance, sets up a key and a default octave as part of its header, so they may need to be passed in ("F" in the key "D" would convert to "F#" etc.).
Atm, I'm favouring the named parameter style (easy to maintain and pass extra parameters ) but I'd be grateful for any input before I "get my coding pencil out" :)
Cheers,
Ben.
Title edit by tye
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: A Matter of Style...
by Skeeve (Parson) on Aug 12, 2003 at 11:27 UTC | |
|
Re: A Matter of Style...
by Juerd (Abbot) on Aug 12, 2003 at 11:27 UTC | |
|
Re: A Matter of Style...
by dragonchild (Archbishop) on Aug 12, 2003 at 13:06 UTC | |
|
Re: A Matter of Style...
by fglock (Vicar) on Aug 12, 2003 at 12:37 UTC | |
by benn (Vicar) on Aug 12, 2003 at 12:56 UTC | |
|
Re: A Matter of Style...
by benn (Vicar) on Aug 12, 2003 at 14:09 UTC |