--/NkBOFFp2J2Af1nK
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Mar 19, 2015 at 01:49:32PM -0700, Ryan Davis wrote:
>=20
> > On Mar 19, 2015, at 07:14, Darryl L. Pierce <mcpierce / gmail.com> wrote:
> >=20
> > I'm developing some code that needs to intercept when an instance
> > variable is set for a class. It needs to be arbitrary; i.e., I don't
> > want to have to have code declare variables differently than they do now
> > and I don't want them to have to create mutator methods (since it needs
> > to intercept non-public values as well).
>=20
> You can't, at least not without some serious C-level hacking. There are n=
o hooks for such a thing (there are hooked variables that you can trace, bu=
t they're all globals).
>=20
> This is a big reason why my code has as few "@"s as possible. Wrapping an=
 accessor method is a lot simpler than hooking into the runtime itself.

Hrm, I hadn't quite thought of it like that; i.e., discouraging using @
instance variables in code that uses our library. I was hoping to make
the code work as unobtrusively as possible. But you make a great point
that, by encouraging this sort of pattern, it gives us more ability to
enhance the library over time.

--=20
Darryl L. Pierce <mcpierce / gmail.com>
http://mcpierce.blogspot.com/
Famous last words:
   "I wonder what happens if we do it this way?"

--/NkBOFFp2J2Af1nK
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iEYEARECAAYFAlUMKWsACgkQtddqM0QFuLK1wwCfTI4n+cYzbh6cynMdf0kGaweR
n2UAnjOUIzrJDGKOeuKuoZK/UgvlZQTd
=IUaB
-----END PGP SIGNATURE-----

--/NkBOFFp2J2Af1nK--
On Thu, Mar 19, 2015 at 01:49:32PM -0700, Ryan Davis wrote:
>=20
> > On Mar 19, 2015, at 07:14, Darryl L. Pierce <mcpierce / gmail.com> wrote:
> >=20
> > I'm developing some code that needs to intercept when an instance
> > variable is set for a class. It needs to be arbitrary; i.e., I don't
> > want to have to have code declare variables differently than they do now
> > and I don't want them to have to create mutator methods (since it needs
> > to intercept non-public values as well).
>=20
> You can't, at least not without some serious C-level hacking. There are n=
o hooks for such a thing (there are hooked variables that you can trace, bu=
t they're all globals).
>=20
> This is a big reason why my code has as few "@"s as possible. Wrapping an=
 accessor method is a lot simpler than hooking into the runtime itself.

Hrm, I hadn't quite thought of it like that; i.e., discouraging using @
instance variables in code that uses our library. I was hoping to make
the code work as unobtrusively as possible. But you make a great point
that, by encouraging this sort of pattern, it gives us more ability to
enhance the library over time.

--=20
Darryl L. Pierce <mcpierce / gmail.com>
http://mcpierce.blogspot.com/
Famous last words:
   "I wonder what happens if we do it this way?"
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iEYEARECAAYFAlUMKWsACgkQtddqM0QFuLK1wwCfTI4n+cYzbh6cynMdf0kGaweR
n2UAnjOUIzrJDGKOeuKuoZK/UgvlZQTd
=IUaB
-----END PGP SIGNATURE-----