Boost logo

Boost :

Subject: Re: [boost] first steps to submitting - boost :: observers
From: Robert McInnis (r_mcinnis_at_[hidden])
Date: 2016-09-18 12:31:26

Larry Evans wrote:
>the variables x, y, and z are of type:
> boost::observers::Numeric< long >
>yet the description says:
> We now have three(3) observables X, Y, and Z.
>which is confusing. Are they observers (as the type name suggests), or are
they observables (as the descriptions suggests).

I had considered having two sub lib names, observers and observables, but
was unsure how that would be received. If that's ok, I can make that

My personal library is called 'GOTools' for 'guarded and observable tools'.
I didn't go with that as most would have no idea what it meant. The
original Subject class was called MsgCB, but that was originally done around
1991 and doesn't quite fit with the observer pattern as described. Many
times I've had objects with multiple Subjects to observe (usually UI
objects). Hooking the activateCB on one button would trigger a hide/show on
another UI component. Or maybe the rgbCB would trigger as the user drags
the control, which would trigger an image to re-render using the new colors.
Flexibility is the key and the ability for the developer to make any event
produced by any object, observed by any other object, is the goal.

> Also, the description uses capital letters, but the code uses small
> It would ease the reading if better names were used ;(

I used X, Y, and Z as the formulas are simple algebraic equations. I've
modified the case to match. Lower case felt like it 'got lost' in the
description text

Boost list run by bdawes at, gregod at, cpdaniel at, john at