Mailinglist Archive: yast-devel (50 mails)

< Previous Next >
Re: [yast-devel] New libstorage: Returning NULL pointers vs. throwing exceptions
Dne 24.11.2015 v 16:45 Josef Reidinger napsal(a):
On Tue, 24 Nov 2015 15:47:24 +0100
Stefan Hundhammer <shundhammer@xxxxxxx> wrote:

On 24.11.2015 15:15, Josef Reidinger wrote:
Well, in OOP is also one more approach called NullObject pattern,
which is create kind if partition table, that in represent no
partition table.

This is wrong on so many levels that I don't even know where to
begin...

I know it is a bit controversy, similar like Singleton pattern. I agree
that over use it is bad design, but I also think it works nice in some
situations.

Null objects are used in libzypp quite a lot (e.g. [1], [2]).

The libzypp API is huge and IMHO well designed. Sometimes too many templates
or "magic" boost patterns, but that's probably because I'm not an experienced
C++
developer. In general I like the API.

Maybe we could ask the libzypp developers for their experience with such
a huge API? To get some recommendations and early feedback...


[1] https://github.com/openSUSE/libzypp/blob/master/zypp/Repository.h#L62
[2] https://github.com/openSUSE/libzypp/blob/master/zypp/RepoInfo.h#L80

--

Ladislav Slez√°k
Appliance department / YaST Developer
Lihovarsk√° 1060/12
190 00 Prague 9 / Czech Republic
tel: +420 284 028 960
lslezak@xxxxxxxx
SUSE
--
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: yast-devel+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups