I had some questions about NewValueHolder and I figured, why not revive COTDC?! The current comment is: "A NewValueHolder is a new implementation of ValueHolder based on Announcements". Of course, ValueHolder doesn't have a class comment. Wikipedia claims a value holder is "a generic object that handles the lazy loading behavior, and appears in place of the object's data fields" [1]. So: - what is a NewValueHolder? - is the "Value Holder" part of the name accurate in light of [1]. Obviously repurposing a term people may already be familiar with is a bad idea. In fact the important part here seems not the holding of the value, but the notification of changes. It seems more like an event in FRP. How about ReactiveVariable or AnnouncingVariable, since it combines the storage of a variable with announcing of changes? I like Reactive a bit better because those familiar with FRP will get the idea that it's notifying dependents, Announcing maybe begs the question "announcing what?" - should it replace ValueHolder, which is used only by ExclusiveWeakMessageSend and WidgetExamples [1] http://en.wikipedia.org/wiki/Lazy_loading p.s. [OT] valueChanged: oldValue to: newValue seems fishy. It is only used in one place in the image in this weird way "pickedItemsHolder valueChanged: true to: item" ----- Cheers, Sean -- View this message in context: http://forum.world.st/COTDC-108-NewValueHolder-tp4738066.html Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
On 20 Jan 2014, at 15:36, Sean P. DeNigris <sean@clipperadams.com> wrote:
I had some questions about NewValueHolder and I figured, why not revive COTDC?!
I loved it :)
The current comment is: "A NewValueHolder is a new implementation of ValueHolder based on Announcements". Of course, ValueHolder doesn't have a class comment. Wikipedia claims a value holder is "a generic object that handles the lazy loading behavior, and appears in place of the object's data fields" [1]. So: - what is a NewValueHolder?
I am a class holding any object inside its unique instance variable. Each time the instance variable value changes, an announcement is emitted. The instance variable is accessed through `value` and `value:` while the registration is done by `whenChangedDo: aBlock`. In addition, infinite loops of propagation are prevented. Use case: you have two lists A, and B, and you want to keep their selection synchronised. So when A selection changes, you set B selection. But since B selection changes, you set A selection, and so on⦠This case is prevented by the use of value holders.
- is the "Value Holder" part of the name accurate in light of [1].
Nope :(
Obviously repurposing a term people may already be familiar with is a bad idea.
Itâs called NewValueHolder because itâs a re-implementation of ValueHolder :) I did not checked the name :P
In fact the important part here seems not the holding of the value, but the notification of changes.
Indeed
It seems more like an event in FRP. How about ReactiveVariable or AnnouncingVariable, since it combines the storage of a variable with announcing of changes? I like Reactive a bit better because those familiar with FRP will get the idea that it's notifying dependents, Announcing maybe begs the question "announcing what?â
I like Reactive too. It sounds like we are doing cool things :P
- should it replace ValueHolder, which is used only by ExclusiveWeakMessageSend and WidgetExamples
Might be yes, I did not checked the users of ValueHolder in a while.
p.s. [OT] valueChanged: oldValue to: newValue seems fishy. It is only used in one place in the image in this weird way "pickedItemsHolder valueChanged: true to: itemâ
Probably a bad hack I did :P Ben
2014/1/20 Benjamin <benjamin.vanryseghem.pharo@gmail.com>
On 20 Jan 2014, at 15:36, Sean P. DeNigris <sean@clipperadams.com> wrote:
I had some questions about NewValueHolder and I figured, why not revive COTDC?!
I loved it :)
The current comment is: "A NewValueHolder is a new implementation of ValueHolder based on Announcements". Of course, ValueHolder doesn't have
a
class comment. Wikipedia claims a value holder is "a generic object that handles the lazy loading behavior, and appears in place of the object's data fields" [1]. So: - what is a NewValueHolder?
I am a class holding any object inside its unique instance variable. Each time the instance variable value changes, an announcement is emitted.
we should distinguish between "storing a object" and "change a value". At the moment, NewValueHolder announces every time we store into this value holder regardless wether the value changed.
On 20 Jan 2014, at 19:24, Nicolai Hess <nicolaihess@web.de> wrote:
we should distinguish between "storing a object" and "change a value". At the moment, NewValueHolder announces every time we store into this value holder regardless wether the value changed.
Thatâs true. It was not clear enough :) Thanks, Ben
Benjamin Van Ryseghem-2 wrote
In addition, infinite loops of propagation are prevented.
Is that what lock is all about? I was wondering... ----- Cheers, Sean -- View this message in context: http://forum.world.st/COTDC-108-NewValueHolder-tp4738066p4738129.html Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
I made an issue summarizing this thread. I'll take care of it when comments die down here⦠https://pharo.fogbugz.com/default.asp?12684 ----- Cheers, Sean -- View this message in context: http://forum.world.st/COTDC-108-NewValueHolder-tp4738066p4738150.html Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
I commented the code in a slice that apparently was not integrated. But yes this is a good idea. - to have more code review - to revive the COTDC!!!!
I had some questions about NewValueHolder and I figured, why not revive COTDC?!
The current comment is: "A NewValueHolder is a new implementation of ValueHolder based on Announcements". Of course, ValueHolder doesn't have a class comment. Wikipedia claims a value holder is "a generic object that handles the lazy loading behavior, and appears in place of the object's data fields" [1]. So: - what is a NewValueHolder? - is the "Value Holder" part of the name accurate in light of [1]. Obviously repurposing a term people may already be familiar with is a bad idea. In fact the important part here seems not the holding of the value, but the notification of changes. It seems more like an event in FRP. How about ReactiveVariable or AnnouncingVariable, since it combines the storage of a variable with announcing of changes? I like Reactive a bit better because those familiar with FRP will get the idea that it's notifying dependents, Announcing maybe begs the question "announcing what?" - should it replace ValueHolder, which is used only by ExclusiveWeakMessageSend and WidgetExamples
[1] http://en.wikipedia.org/wiki/Lazy_loading
p.s. [OT] valueChanged: oldValue to: newValue seems fishy. It is only used in one place in the image in this weird way "pickedItemsHolder valueChanged: true to: item"
----- Cheers, Sean -- View this message in context: http://forum.world.st/COTDC-108-NewValueHolder-tp4738066.html Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
NewValueHolder? the name sounds like a Squeak strategy: keep backward compatibility as long as possible. Since Pharo values cleanlyDesigned > backwardCompatible, I would expect ValueHolder->LegacyValueHolder and NewValueHolder->ValueHolder. We had too many NewParagraph, etc... in the past, history does not necessarily have to repeat itself ;) 2014/1/20 Stéphane Ducasse <stephane.ducasse@inria.fr>
I commented the code in a slice that apparently was not integrated. But yes this is a good idea. - to have more code review - to revive the COTDC!!!!
I had some questions about NewValueHolder and I figured, why not revive COTDC?!
The current comment is: "A NewValueHolder is a new implementation of ValueHolder based on Announcements". Of course, ValueHolder doesn't have a class comment. Wikipedia claims a value holder is "a generic object that handles the lazy loading behavior, and appears in place of the object's data fields" [1]. So: - what is a NewValueHolder? - is the "Value Holder" part of the name accurate in light of [1]. Obviously repurposing a term people may already be familiar with is a bad idea. In fact the important part here seems not the holding of the value, but the notification of changes. It seems more like an event in FRP. How about ReactiveVariable or AnnouncingVariable, since it combines the storage of a variable with announcing of changes? I like Reactive a bit better because those familiar with FRP will get the idea that it's notifying dependents, Announcing maybe begs the question "announcing what?" - should it replace ValueHolder, which is used only by ExclusiveWeakMessageSend and WidgetExamples
[1] http://en.wikipedia.org/wiki/Lazy_loading
p.s. [OT] valueChanged: oldValue to: newValue seems fishy. It is only used in one place in the image in this weird way "pickedItemsHolder valueChanged: true to: item"
----- Cheers, Sean -- View this message in context: http://forum.world.st/COTDC-108-NewValueHolder-tp4738066.html Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
It is the history of a prototype ending in the system :) Ben On 20 Jan 2014, at 18:02, Nicolas Cellier <nicolas.cellier.aka.nice@gmail.com> wrote:
NewValueHolder? the name sounds like a Squeak strategy: keep backward compatibility as long as possible.
Since Pharo values cleanlyDesigned > backwardCompatible, I would expect ValueHolder->LegacyValueHolder and NewValueHolder->ValueHolder.
We had too many NewParagraph, etc... in the past, history does not necessarily have to repeat itself ;)
2014/1/20 Stéphane Ducasse <stephane.ducasse@inria.fr> I commented the code in a slice that apparently was not integrated. But yes this is a good idea. - to have more code review - to revive the COTDC!!!!
I had some questions about NewValueHolder and I figured, why not revive COTDC?!
The current comment is: "A NewValueHolder is a new implementation of ValueHolder based on Announcements". Of course, ValueHolder doesn't have a class comment. Wikipedia claims a value holder is "a generic object that handles the lazy loading behavior, and appears in place of the object's data fields" [1]. So: - what is a NewValueHolder? - is the "Value Holder" part of the name accurate in light of [1]. Obviously repurposing a term people may already be familiar with is a bad idea. In fact the important part here seems not the holding of the value, but the notification of changes. It seems more like an event in FRP. How about ReactiveVariable or AnnouncingVariable, since it combines the storage of a variable with announcing of changes? I like Reactive a bit better because those familiar with FRP will get the idea that it's notifying dependents, Announcing maybe begs the question "announcing what?" - should it replace ValueHolder, which is used only by ExclusiveWeakMessageSend and WidgetExamples
[1] http://en.wikipedia.org/wiki/Lazy_loading
p.s. [OT] valueChanged: oldValue to: newValue seems fishy. It is only used in one place in the image in this weird way "pickedItemsHolder valueChanged: true to: item"
----- Cheers, Sean -- View this message in context: http://forum.world.st/COTDC-108-NewValueHolder-tp4738066.html Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
Hi nicolas. I do not remember but it seems that I did a slice to move NewValueHolder out of Spec inside their own package. Then we should rename and remove the old one but it takes time and if somebody does it will go faster. Stef
NewValueHolder? the name sounds like a Squeak strategy: keep backward compatibility as long as possible.
Since Pharo values cleanlyDesigned > backwardCompatible, I would expect ValueHolder->LegacyValueHolder and NewValueHolder->ValueHolder.
We had too many NewParagraph, etc... in the past, history does not necessarily have to repeat itself ;)
2014/1/20 Stéphane Ducasse <stephane.ducasse@inria.fr> I commented the code in a slice that apparently was not integrated. But yes this is a good idea. - to have more code review - to revive the COTDC!!!!
I had some questions about NewValueHolder and I figured, why not revive COTDC?!
The current comment is: "A NewValueHolder is a new implementation of ValueHolder based on Announcements". Of course, ValueHolder doesn't have a class comment. Wikipedia claims a value holder is "a generic object that handles the lazy loading behavior, and appears in place of the object's data fields" [1]. So: - what is a NewValueHolder? - is the "Value Holder" part of the name accurate in light of [1]. Obviously repurposing a term people may already be familiar with is a bad idea. In fact the important part here seems not the holding of the value, but the notification of changes. It seems more like an event in FRP. How about ReactiveVariable or AnnouncingVariable, since it combines the storage of a variable with announcing of changes? I like Reactive a bit better because those familiar with FRP will get the idea that it's notifying dependents, Announcing maybe begs the question "announcing what?" - should it replace ValueHolder, which is used only by ExclusiveWeakMessageSend and WidgetExamples
[1] http://en.wikipedia.org/wiki/Lazy_loading
p.s. [OT] valueChanged: oldValue to: newValue seems fishy. It is only used in one place in the image in this weird way "pickedItemsHolder valueChanged: true to: item"
----- Cheers, Sean -- View this message in context: http://forum.world.st/COTDC-108-NewValueHolder-tp4738066.html Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
Since nobody looks at it: here are the issue (they contain class comments). https://pharo.fogbugz.com/default.asp?12572 https://pharo.fogbugz.com/default.asp?12486 Apparently all the work I did around Spec is not reviewed. May be I should push them without waiting from any feedback. Stef
On 21 Jan 2014, at 04:53, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
Since nobody looks at it: here are the issue (they contain class comments).
is a print case of the following, so will not be checked until the child case is integrated.
Resolved (Fixed upstream) aka integrated in Spec So itâs just waiting to be integrated in Pharo.
Apparently all the work I did around Spec is not reviewed.
So this is basically false, and not motivating as a statement.
May be I should push them without waiting from any feedback.
⦠Ben
participants (5)
-
Benjamin -
Nicolai Hess -
Nicolas Cellier -
Sean P. DeNigris -
Stéphane Ducasse