[Pharo-dev] allProtocols vs protocols

Stéphane Ducasse stephane.ducasse at inria.fr
Sun Nov 24 16:08:32 EST 2013


I have a question:  why allProtocols returns an array and protocols a set?

allProtocols

	^ { allProtocol }, protocols asArray


protocols

	^ protocols

protocolsNames

	^ protocols 
		collect: #name 
		as: Array


initialize

	super initialize.

	protocols := IdentitySet new.
	allProtocol := AllProtocol protocolOrganizer: self.


to me it looks suspicious and it will be a source of bugs.

Stef




More information about the Pharo-dev mailing list