More slot confusion (same functionality, different names)
Mildred Ki'Lya
ml.mildred593 at gmail.com
Fri Jul 31 19:01:50 UTC 2009
On 07/31/2009 03:13 PM, Jeremy @ Cowgar wrote:
> These functions are exactly the same (except they use different
> parameter names, which is not really good style). Another place in
> code there is index_of ch:CHARACTER since start_index:INTEGER...
> Thus, it's easy to see that index_of is is first_index_of.
>
> All these choices makes it harder for a new person to learn Lisaac
> and also makes code inconsistent. In an application, one developer
> uses index_of and another uses first_index_of just because of
> stylist reasons.
>
I think the policy is that it's better to have more slots, with full
names than less.
I suppose that at first we had first_index_of and last_index_of, but
index_of was created as a shortcut for first_index_of (since that will
be probably the most used slot).
I think this policy makes sense since Lisaac doesn't permit default
values for parameters. As a consequence if you want to create a slot
with a default parameter, you create a second slot with no parameter
that calls the first. You end up with many slots that are very similar.
Now, I don't know how the documentation is, but I think all those
similar slots ought to be described together, so we know they are
related, and that some are only alias slots.
Mildred.
--
Mildred Ki'Lya
╭───────── mildred593@online.fr ──────────
│ Jabber, GoogleTalk: <mildred at jabber.fr>
│ Website: <http://ki.lya.online.fr> GPG ID: 9A7D 2E2B
│ Fingerprint: 197C A7E6 645B 4299 6D37 684B 6F9D A8D6 9A7D 2E2B
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/lisaac-devel/attachments/20090731/33a09972/attachment.pgp>
More information about the Lisaac-devel
mailing list