[Pharo-users] SequenceableCollection>>#allButFirst: inconsistence across subclasses

Kasper Østerbye kasper.osterbye at gmail.com
Mon Sep 2 12:00:51 EDT 2019

This is actually an intersting discussion. There are several levels to it.

1. Should Pharo be compatible with a standard from 1998?
2. What is the general view on using exceptions in Pharo?
3. What should allButFirst: do?

Ad 1) I am relatively new to Pharo, If backwards compatibility is
important, it should adhere to the standard and the spirit of the standard.
If we want a different semantics in some areas, it seems like new methods
are needed, with names which is not confused with existing standard.

Ad 2) I am so new to Pharo I do not even know how efficient (or expensive)
exceptions are in Pharo. In most programming languages they are expensive,
and should not be used as an alternative to an if statement. My views on
exceptions are very influenced by Bertrand Meyer, which lead me to the view
that a) Asking for the all but the first three elements of a two element
array is most likely a broken pre-condition. Hence an error. b) As it is
the clients responsibility to ensure precondition, we might as well help
the client of the collection by offering an other method with a different

Ad 3. Should follow from the first two :-)


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-users_lists.pharo.org/attachments/20190902/09c968f7/attachment.html>

More information about the Pharo-users mailing list