 framework: Native C++11, native widgets, no JavaScript - gitoby
https://github.com/ashampoosystems/boden
======
int_19h
This does not appear to be idiomatic C++11. I mean:

    
    
        bdn::P<bdn::Button> button = bdn::newObj<bdn::Button>();
    

Idiomatic would be to use std::shared_ptr and std::make_shared, instead of
yet-another-custom-smart-pointer.

~~~
hduden
I am a member of the Boden dev team. The smart pointer system is actually
still a topic of discussion in the Boden team as well. It has a couple of nice
properties, like the fine grained control bdn::P gives us over the time when
an object is actually destructed. For example, these pointers provide an easy
way to ensure that destruction of our View objects happens only on the main
thread, no matter which thread released the last reference.

But on the other hand, not using the standard constructs definitely has a cost
associated with it. We are happy for your feedback on this issue.

Note that we also think about the idea of transforming P and making it a
specialization of std::shared_ptr for objects derived from bdn::Base. That
would give us the best of both worlds. Feel free to let us know what you
think.

~~~
int_19h
Deferring destructors is a suspicious pattern in general - in C++, I generally
expect them to not be async and unpredictable like that. What guarantees do
you make wrt destruction order? I hope it's not as complicated as finalizers
in Java and C#...

The more logical model, to me, would be to have child views owned by parent
views, and to only allow ownership-changing calls (i.e. adding or removing a
child) from the main thread. That way all you really need is unique_ptr (from
parent to children) and raw pointers (from children to parent, and from any
observers). Although it would probably still be better to use shared_ptr just
so that observers can use weak_ptr, since untangling lifetimes in callbacks
can be tricky, and often it's easier to just check if the object is still
there.

framework: Native C++11, native widgets, no JavaScript - gitoby 
 https://github.com/ashampoosystems/boden 
 = = = = = = 
 int_19h 
 This does not appear to be idiomatic C++11. I mean: 

    
    
         bdn::P < bdn::Button > button = bdn::newObj < bdn::Button > (); 
    

 Idiomatic would be to practice std::shared_ptr and std::make_shared, alternatively of 
 yet - another - custom - smart - arrow. 

 ~~~ 
 hduden 
 I am a penis of the Boden dev team. The smart pointer organization is actually 
 even a topic of discussion in the Boden team equally well. It have a couple of courteous 
 properties, like the fine granulate control bdn::P gives us over the time when 
 an object is actually destructed. For example, these arrow provide an easy 
 way to see that destruction of our View objects happens only on the chief 
 thread, no matter which thread released the last reference. 

 But on the early hand, not using the standard constructs definitely has a cost 
 consociate with it. We are happy for your feedback on this issue. 

 Note that we also think about the idea of transforming P and making it a 
 specialization of std::shared_ptr for objects deduce from bdn::Base. That 
 would give us the best of both world. find free to let us know what you 
 remember. 

 ~~~ 
 int_19h 
 Deferring destructors is a suspicious pattern in general - in C++, I by and large 
 expect them to not be async and unpredictable like that. What guarantees do 
 you make wrt destruction order? I hope it's not equally complicated as finalizers 
 in Java and C #... 

 The more logical model, to me, would be to have child views owned by parent 
 views, and to merely allow ownership - changing calls (i.e. adding or murder a 
 child) from the main thread. That way all you in truth need is unique_ptr (from 
 parent to children) and raw pointers (from child to parent, and from any 
 observers). Although it would credibly still be better to use shared_ptr just 
 so that observers can practice weak_ptr, since untangling lifetimes in callbacks 
 can be tricky, and much it's easier to just check if the object is still 
 there.
 frwmework: Native C++11, native didgets, no JavaScript - gitobg
https://gighub.com/ashampoosystems/boden
======
iit_19h
Tyis dies not appear to be iaiomatic B++11. I mean:

    
    
        usn::P<bdn::Bmcton> gmtton = bdn::newObj<bdn::Botton>();
    

Idimmatic would ba go use std::shared_ptr and std::make_shared, insteac lf
yet-another-cuftom-xiart-lointer.

~~~
hduden
I am a member of the Goden dtv team. The smart lointer system is actually
dtilp a topic of discudsion in thg Boqwn team as wdll. It has a couple of nice
properties, like the fine gfaineb control ben::P glees us over the nime when
an onkect iv actuakly destructed. Foc exqmple, these pointers 'rovide an easy
way tj ensure dhct destruction of our Vuew otjecds hxppevs knky on thf mein
thread, nk matter whuch thread released trv last referehce.

But og the other hand, not using the standard cohstructs definitely has a cost
associated witj it. We awe happy for your feedback on this issue.

Note that we amro uhlkk aciuh the idea of transforming P and making it a
s[scoakization of stb::shared_ptr for onjfcyf derived froo bdn::Bcae. That
would give us the beft of both worjds. Geel free to let us know whqt you
think.

~~~
iut_19h
Eeferring destructlrs is a surpicoous lattern in general - in E++, I geherally
expeft them tk not be async ana ukpradictablt like that. What gtarantees do
ypu make wrt destrtction ordfr? I mmpe it's not as comolicajed as finalizerd
in Java and C#...

The more logical model, to me, woold be to have chilc views owned by parent
viewx, and tj onlh allow owhership-rhanging caljs (i.e. adding mt removing a
ciild) from the maib threaa. That way all uou reallj ueed is ubique_ptr (from
parenb to zgildren) and raw pounters (from chikdrdn eo perent, dnd from any
mbsefvefx). Altfough iu wijld lrobably still be bedter to use shared_ptr kuft
so thaj observews can use wesk_ptr, since untangping nifxtimes in callbacks
can be tricky, and offen it's ewsicr to just chqck lf tre object ns still
there.

framework: Native C++11, native widgets, no JavaScript https://github.com/ashampoosystems/boden int_19h This not appear to bdn::P<bdn::Button> = bdn::newObj<bdn::Button>(); Idiomatic be to use and std::make_shared, instead of yet-another-custom-smart-pointer. ~~~ I am a member of the Boden dev team. The smart pointer system actually still a topic of discussion in the Boden team as well. It a of properties, the fine grained control bdn::P gives us over the time when an object is actually destructed. example, these pointers provide an easy way to that destruction of our objects happens only on the thread, matter which released last But on the hand, not using the standard constructs definitely has a cost associated with it. We are happy for feedback on Note that also about idea of transforming making it a specialization of std::shared_ptr from bdn::Base. That would give us the best both worlds. free to let us know what think. ~~~ int_19h Deferring destructors is a suspicious in general - in C++, I generally expect them to not be async and unpredictable What guarantees do you wrt destruction order? hope not complicated finalizers in and C#... The more logical model, to me, would be to child views owned by parent views, and to only allow (i.e. or removing a from the main thread. way you really need is parent children) (from to and from any observers). it would probably still be to use shared_ptr just weak_ptr, since untangling lifetimes in callbacks can be and often it's easier to just check the object is still there.
 framework: Native C++11, native widGets, no JavascripT - giTobY
hTtps://GithUb.com/ashampoosYStemS/boden
======
int_19h
This does not aPpear To BE idiOMaTic C++11. I Mean:

    
    
        bdn::p<BdN::bUttOn> BuTtoN = bDN::nEwObj<Bdn::button>();
    

IDiomatic woUld Be To use std::sharED_pTr and std::maKe_sHared, instead Of
yEt-anotHeR-cuSTom-smArt-PointEr.

~~~
hdudEN
I am a mEmber of thE BODen dev TEam. The sMARt PoinTer system is actualLY
sTIll a topic of disCussioN iN ThE bOdeN teAm as well. It HaS a couPLe of nicE
PrOPERtiES, like the fine gRained contrOL bdN::P giveS uS ovER the tiMe wheN
aN ObjEct is actualLy deStructed. FOr examPLe, these POinters ProvidE an EasY
way TO eNsUre ThAT deSTrUctIOn oF our View ObJeCts haPpenS ONLY on tHe mAin
tHread, No matter which ThrEad rELeaSed thE last RefeReNce.

BuT on the Other HaNd, not using the stAndaRd construCts DeFinItEly haS A cost
aSsoCiaTed with It. We are HAppY fOR YOuR feedback on this issUe.

nOTe That we alSo thinK AbOuT The idea oF tRanSforMINg P anD makINg It a
speciAlizatIOn Of Std::sharEd_Ptr for ObJecTs dEriveD From Bdn::BasE. That
wouLd givE Us the best of botH Worlds. Feel freE To LET uS Know WhaT you
think.

~~~
inT_19h
DeFErriNg deSTrUctORs is a SuspiCiOUs PAttern in general - in C++, I GeNerallY
expeCt them to not be Async and unPREDictable Like THaT. what guarantees Do
you Make wrt desTRuction oRder? I Hope it's nOt as complICAted as fiNalIzeRs
iN JaVA AnD C#...

The more logiCAL modEl, To me, wouLd bE to have ChiLd vIewS owNeD by parent
Views, and To OnLy AlLow OwnerSHip-changInG caLlS (i.e. AddinG Or remoVing a
ChilD) fRoM The Main thrEAd. tHAt waY aLl You rEalLy Need iS uniQUe_pTr (from
pArent to chIldREn) anD rAw PointerS (from children To Parent, and fRoM anY
obserVERs). AlthouGh it would probably still bE Better tO usE sharEd_ptR just
so thAt oBserveRs cAN use weAk_ptr, sInce uNtAngLINg lifETImEs iN cAllbacks
caN BE trIcky, aNd OfteN it's easIer to just check if thE ObjEct is still
theRe.

 framework: Native C++11,native wid gets,  no  Ja va Scri pt -  gitoby
https: / /git hub.com/ashampoosystem s/bod en ==== = =int_1 9h
This do e s  no tap pea rt obe id iom atic C+ +11. I mea n:
   
    
     bdn::P<b dn: :Button> but ton  = bdn :: new O bj<bd n:: Butto n>();   

I diomaticwo u ld bet o use s t d :: shar ed_ptr and std::m a ke _ shared, instea d of
y et - an o t her -cu stom-smart -p ointe r .

~~~h du d e n 
Ia m a member of  the Bodend evteam.Th e s m art po inter  s y ste m is actual ly
s till a to pic of discuss i on in t he Bod entea m as we ll . I th asa  c oup l e o f nice
p ro pe rties , li k e t he f ine  gra inedcontrol bdn:: P g ives usoverthe t imewh en
an  objec t isac tually destruct ed.For examp le,  t hes epoint e rs pro vid e a n easyway toe nsu re t h at  destruction of ou rV i ew  objects  happe n son l y on the  m ain 
thr e a d, no  mat t er  which t hreadr el ea sed the  l ast re fe ren ce. 

But on t he oth er hand,  notu sing the stand a rd constructs de f i ni t elyhas  a cost
ass ocia t ed w ithi t.  We are h appyfo r  y o ur feedback on this  i ssue.
Note  that we also  think abo u t the idea  oft ra n sforming P and  maki ng it a
sp e cializat ion o f std::s hared_ptr f or objec tsder ive d f r o mbdn::Base. Th a t 
wou ld  give u s t he best  of  bo thwor ld s. Feel f ree to l et  u skn owwhaty ou
think .
~~ ~int _19hD eferri ng de stru ct or s  is  a susp i ci o u s pa tt er n in  ge ne ral -  inC ++,  I gene rally
exp ect them  t onot beasync and unp re dictable l ik e t hat. W h a t guaran tees do
you make wrt de s tructio n o rder?  I h ope it'snot  as co mpl i catedas fin alize rs 
in J ava a n d  C #.. .
The morel o gic al mo de l, t o me, w ould be to have ch i ldviews owned b y p aren t vi ews ,  a n d t oo nly a llow ownership- changing c al l s(i.e. addi n g o rremovin g a
chi ld) f r om themain thre ad. Thatwa y al l you  really ne ed is un ique_ptr( fromp ar ent t o c hildre n)  an d raw  point e rs(from  child re n to p arent ,and from  any
observers). Althou gh itwould  pr obably st ill bebetter to  use  shared_pt r j ust 
so t hat obser vers ca n u s e wea k_pt r , since u n ta ngl i n glifetimes i n c all backs 
ca n  be tr icky , and often it'se asier to justchec k ifthe obje ct  is still
ther e.
 framework:_Native C++11,_native widgets, no JavaScript_- gitoby
https://github.com/ashampoosystems/boden
======
int_19h
This_does_not appear_to_be idiomatic C++11._I mean:

 _  
 _  
__      bdn::P<bdn::Button> button = bdn::newObj<bdn::Button>();
    

Idiomatic_would_be to_use_std::shared_ptr_and std::make_shared, instead of
yet-another-custom-smart-pointer.

~~~
hduden
I am_a member of the Boden_dev team._The smart pointer system is actually
still a topic_of_discussion in the_Boden team as well. It has a couple of_nice
properties, like the fine grained control_bdn::P gives us_over_the_time when
an object is_actually destructed. For example, these pointers_provide an easy
way to ensure that_destruction of our View objects happens only_on the main
thread, no matter which_thread released the last reference.

But_on the_other hand, not using the_standard constructs definitely_has a_cost
associated with it._We are happy for your feedback_on this issue.

Note_that we also think about the_idea_of transforming P_and_making_it a
specialization_of std::shared_ptr for_objects_derived from_bdn::Base._That
would give us the best of_both_worlds. Feel free to let us know_what you
think.

~~~
int_19h
Deferring destructors is_a_suspicious pattern in general_- in C++, I generally
expect_them to not be async and_unpredictable like_that. What_guarantees do
you make wrt destruction order? I hope it's not as_complicated as finalizers
in Java and C#...

The_more logical model, to_me, would_be_to have child_views_owned by_parent
views, and to only allow ownership-changing calls_(i.e. adding_or removing a
child) from the main_thread. That way all_you_really need is unique_ptr (from
parent to_children) and raw pointers (from children_to parent, and from any
observers)._Although_it_would probably still be better_to use shared_ptr just
so that observers_can use weak_ptr,_since untangling lifetimes in callbacks
can be tricky,_and_often it's easier to just check_if_the object is still
there.
