librelist archives

« back to archive

May this apply?

May this apply?

From:
Paolo Redaelli
Date:
2010-07-29 @ 22:38
Please read this from a long-time hacker

http://blog.pdark.de/2010/07/21/dependency-injection-and-reference-passing/

I do not know that pattern; may it be useful to "get rid" of singletons
in Eiffel?

Re: [libertyeiffel] May this apply?

From:
Cyril Adrian
Date:
2010-07-30 @ 20:06
On Fri, Jul 30, 2010 at 00:38, Paolo Redaelli <paolo.redaelli@gmail.com>wrote:

> Please read this from a long-time hacker
>
> http://blog.pdark.de/2010/07/21/dependency-injection-and-reference-passing/
>
> I do not know that pattern; may it be useful to "get rid" of singletons
> in Eiffel?
>

I don't think so. There is no DI framework in Eiffel, and anyway singletons
are well defined and easily de-singletonized thanks to the handy "once"
features that can be redefined.

Note that the main drawback of singletons is that they hinder testability.

-- 
Cyril *ADRIAN*

*http://www.cadrian.net/cyril*

*http://www.viadeo.com/invitation/cyril.adrian*<http://www.viadeo.com/invitation/cyril.adrian>