julia> a = Makie.Observable(rand(5))
ERROR: UndefVarError: Observable not defined
Stacktrace:
[1] getproperty(::Module, ::Symbol) at .\Base.jl:26
[2] top-level scope at none:0
julia> a = Makie.Node(rand(5))
Observable{Array{Float64,1}} with 0 listeners. Value:
[0.8777070772545308, 0.08807852512638004, 0.889451005211209, 0.045739032982380134, 0.3469881760911002]
it ~is totally not cool~ makes little sense to use "Node" instead of the name of what the thing actually is. Please allow Observables, or better yet, replace all Node with Observable.
I'm not really keen on an issue text stating that something is "totally not cool" - not so much that it's not so friendly, but it's also really vague. Could you maybe specify exactly what issue this is causing for you, or whether this is in violation on official guidelines?
Anyway, there's a reason for this - it allows to change what Node does in Makie without committing type piracy - there's no promise that it will continue being identical to an Observable.
True, you have a point, and I apologize for my offensive and misleading wording, so I altered the text to reflect the reality as I see it in my eyes. Here is why I see the reality like this:
Node in fact are error messages about Observable.it allows to change what Node does in Makie without committing type piracy
Please explain to me how this is possible. Any dispatch towards Node is in fact dispatch towards Observable.
IMO we're pretty set on the Observables system, so I can see where this is coming from. We could make an alias Obs or something instead?
In any case, even if you completely disagree with what I say, it costs you nothing to export Observable as well as Node.
Can do, that shouldn't be hard. To address your comment - vertices of graphs are also called nodes, so if you think of Observables as encoding dependency chains of updates, then this makes sense.
I personally agree it would make sense to have it just be Observables, but I don't know if Simon plans to take the Node implementation somewhere else. (And Observable is terrible to type :smile: )
vertices of graphs are also called nodes, so if you think of Observables as encoding dependency chains of updates, then this makes sense.
Yes I am familiar with graph theory and I thought that Node comes from there. Yet I still argue that the name doesn't make sense here. There is no dependency encoded in Node in Makie, at least not in the basic level. For Makie, "Node" is anything whose value can change interactively in real time. In addition, there is no "connection" encoded in Makie's Nodes (something absolutely mandatory in graph theory), at least not from the user perspective: If I make my marker color a "Node", I don't make it part of a graph, I just make its value possible to change in real time.
The graph version of node has no connection to this behavior.
If I make my marker color a "Node", I don't make it part of a graph
That's not really true, since you do make it part of a call back tree:
a = Node(1)
b = Node(2)
c = map(+, a, b)
...
So these observables will be connected in a graph like structure ;)
But of course, that tree only blossoms inside Makie for your example^^
Anyways, I was also considering to drop the Node alias.
Having my own alias helped a lot going from Reactive.jl to Observables.jl, so I thought its a good idea to keep having this.
But going forward, I started using Observable almost exclusively in my code, and I'm pretty sick of the confusion and having people chose between those two...
Most helpful comment
That's not really true, since you do make it part of a call back tree:
So these observables will be connected in a graph like structure ;)
But of course, that tree only blossoms inside Makie for your example^^
Anyways, I was also considering to drop the
Nodealias.Having my own alias helped a lot going from
Reactive.jltoObservables.jl, so I thought its a good idea to keep having this.But going forward, I started using
Observablealmost exclusively in my code, and I'm pretty sick of the confusion and having people chose between those two...