Danger Will Robinson! Missing API!
Ola Bini
ola.bini at gmail.com
Wed May 25 22:55:22 PDT 2011
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
>
> Well, lacking a method, it's actually probably the most
> straightforward one :-) Ola wins gazillion points for
> resourcefulness.
Actually, it was Remi who came up with this gem when we discussed adding
an isInvalid() method on SwitchPoint.
The thing is, at least where I've used SwitchPoint, having a way of
asking is not as useful as being able to use the pattern to change work
later. So, for example, in Seph I allow "if" to be overridden. If that
doesn't happen I have a fastpath for ifstatements, guarded by a
switchpoint. When someone overrides "if" I want to stop checking for
"if", so I just add the method to check if "if" is overridden to the
switchpoint itself, with a fallback of not doing anything.
I suspect that those kind of patterns are going to be much more common.
>> Can't we just add a method?
>
> Yeah, probably warranted; since the information is available anyway,
> it'd make sense to make it easily accessible.
I'm not against it. =)
Cheers
- --
Ola Bini (http://olabini.com)
Ioke - JRuby - ThoughtWorks
"Yields falsehood when quined" yields falsehood when quined.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQIcBAEBAgAGBQJN3etFAAoJEClcdGmEr38MA1EP/24T31U09cnmJGWwGJz6AsJ+
7qbbfYiemySaWaRymlxVgfBeJOaij/JeIalTfWwKNl6Zmp8+f/RgqB6s4TJfQFQP
joVW2OmsTn2JsG5genl3VxeSMM8UlbhWTTcDbO40u1mxz1o38GrYysaVvwddUYL4
2aQ/vvGlMasr2GCZxKxnciXv1FHjyz/4Blksf8RaecExhL/k64vGICP3MkLnLb3K
4WOKu6POqIYsxsiY9lxcDUKGcW8bmmags0kzv5Y6RzvaHtLLAvq1uT2ZwvdQgoMG
q6ifiv5ot3jzeU+6t843D5gCx6T2QNMiVVmduTinOmwl3V/3DylWLqZSnLhBMMAB
Z2EKTmX9teeYkVh6RTyIiOut9oioMpAUxWB0RkLpr2TNJ4GzH5bc5FXeLnK1MjHX
o6GhW5QV3FysjD8Gar5WJ9KftQ5LnYTGLVu2nmgR0KbL0TLLX0xhcajVqm8loSzk
DLshP0Xt9cZ6X7zetkGMs1/OpcKsk4EK17QpweObUGocNF7RJnkpi2v7YkJWi42j
vX28qvn5FIGRtZpXU6UPzN5jVHjnNQgSCzUoeFTIiJZAo+3h2Z4IiDUvdb0uRgL5
F5xcPZaYJoBDya1h/fa2nKPoiYi/bNMeZuSLL+QeAROsZJca6H+eOFbtCJtqYtJ4
xdSTtawcatxtU3h2pE2+
=6Q8X
-----END PGP SIGNATURE-----
More information about the mlvm-dev
mailing list