develooper Front page | perl.perl6.language | Postings from June 2005

SMD is for weenies

Thread Next
From:
Yuval Kogman
Date:
June 30, 2005 09:08
Subject:
SMD is for weenies
Message ID:
20050630160746.GC23213@woobling.org
As I understand it SMD is now not much more than a mechanism to
place a constraint on the MMD, saying that there can only be one
method or subroutine with the same short name.

Why is this the default?

MMD has a huge value for amending software (especially not your own
software) - specialized cases can be just added next to the generic
one, and they provide either:

	a. a better interface for specific data
	b. a better implementation for specific data
	c. both

but since it is specialized it shouldn't be the one and only
short name - it's not generic.

So far so good?

	method foo is unique ($param) {

	}

From then on no possibly compatible shortnames can be added, and if
there were any,. it's also an error.

If there is any use for SMD besides uniquifying, please clarify it.

If not, please clarify why it should be the default for a module
author who hasn't thought about it - all it does is prevent me from
appending to his code conveniently.

-- 
 ()  Yuval Kogman <nothingmuch@woobling.org> 0xEBD27418  perl hacker &
 /\  kung foo master: /me has realultimatepower.net: neeyah!!!!!!!!!!!!


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About