--nextPart9413615.FoRaQd2guB
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="us-ascii"

On Tuesday 03 June 2014 15:44:13, Matthew Kerwin <matthew / kerwin.net.au=
>=20
wrote:
> That's not valid Ruby code, I don't know what you're trying to repres=
ent
> there. But this is what I was thinking:
>=20
> [...]

That seems to be a pretty elegant solution.

I'd remove the "Color.lookup" code in #scribble, however. IMHO, it intr=
oduces=20
alot of ambiguity: The user gets accustomed to methods that just take "=
a=20
sensible parameter", and in the end, comes up with some kind of paramet=
er the=20
programmer hasn't thought of during API design.

(Disclaimer: I write C++ most of the time, and, by no means, have any=20=

authority whatsover in Ruby API design. ;-))

What about:


=2D--%<---
class Color
=09def self.[](sym)
=09=09return self.lookup sym
=09end
end
=2D-->%---

That would allow easy access to the most commonly used color values and=
 allow=20
the user to just call:

=2D--%<---
scribble Color[:black]
=2D-->%---

Sorry for hijacking this thread. I know it becomes quite philosphical t=
his=20
way, but I'm very much interested in your opinions.

=09=09=09=09--- Eric
--nextPart9413615.FoRaQd2guB
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part.
Content-Transfer-Encoding: 7Bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)

iQIcBAABAgAGBQJTjcpcAAoJEIXD2TZ1epVBFCQP/iaEv5jHCB/HnYykOaw3h5ZS
CLsuGtdkQ6ptuFiWxGT/V5PAPgTQ+Be8uWF6wGUiFRspAuJTIzu9EZC9MPTpdxTn
iEqw8aS1OaRAwYSAg3kfd7XmJ0UHQYYKodZzUpWjwoPnE/SWh7bavkqpaaT/jNjz
u6/1Iin4WdUYSL6taTX14GbnuYqRzpdYGjF0f8n0HCho/OhoEsUbyckCqEycD10R
6kJ4S9ZwH5NxP+PX0E3ugz4x2+jzfg9L8ab+JmgCnRsPeBJ/5DA4i/LQM4gTW3d1
nD5BbV6rvlb0UOtniC4g9lTdytWZIKDQ4jkKXwy5NFVax+sC7QsNXRS6fyPwfE3C
QjXLb5XWQ7RVMejnF6EheGJ8SuATyqAwhE+mkX1fViNfxKKE0TVtQg7zub4tklby
Rly5cGg7jMVbMUnal445Z7shMx+0aHaLYkbCUqs+bWoAKRNX/4iaWGxQi1O0xwfg
uyLYykBlalhJNRrpvKBIlKwuiHfdzWNYOdC2tyR9otIe1Bhql/xF38ka20JbjFQF
MzeWe7kjeT3J+l4l1LIp5hQPNQ9yevZRxGEsVi+vif/xx6lz+SHkVz3UjnzcfP4O
d9aImas777VYqDzBlmHoa61GkJiowDjnRSNW5sbMjdtzQdR21LqKF/JbLcWd5IaI
QNPy2ZEJbLN6P8YNG+XZ
=R0wW
-----END PGP SIGNATURE-----

--nextPart9413615.FoRaQd2guB--