On Thu, Apr 04, 2002 at 03:48:22PM +0200, Lars Gullik Bjønnes wrote:
> | [Which is always a pain in the ass to maintain if you have a dozen members
> | or so...]
> 
> ... and if there are a lot of class variables then something is wrong
> with the design...  (I think I even heard you say that)
> 
> And we want to be typesafe!

Hm, yes. But what as 'typesafety' with the existence of a handcrafted
operator=() to do?
 
> | What the heck is wrong with the auto-generated version of operator=().
> | Less code means less maintance.
> 
> auto generated versions of operator= are never typesafe.

?

Do you mean something like 'threadsafe' or 'commit-or-roll-back'?
'typesafe' makes absolutely no sense to me in this context.

> | And don't tell me LyX would do anything sensible
> | if constructors start throwing. 
> 
> Sure we could.  Gracefull shutdown. emergency save. delete some
> structures to get more memory.

We get the shutdown and emergency save already with catching a signal or
two or just by providing our own allocator.

I would not ever consider implementing 'deleting some structures' for
_LyX_. This is almost impossible to get right in the first place and saves
what? Two keystrokes to move up in the shell history an <Return> after a
clean shutdown? You are kidding, arne't you? 

> | I see no benefit in adding hunderds of lines of code just for obscure
> | theories..
> 
> so so obscure... and not theories either...

Every now and then somebody adds a member to the class but not to swap.
No compiler warning possible. Been there, done that. Removed swap again
in most cases. Called it a 'obscure theory'. 

As long as there is no standard support for std::swap (like
auto-generating it as member-wise swapi e.g.), it is an endless source of
trouble. And as I understand the gurus, there never will be.

Andre'

-- 
Those who desire to give up Freedom in order to gain Security,
will not have, nor do they deserve, either one. (T. Jefferson)

Reply via email to