Giorgos Neokleous
06/13/2019, 9:00 AMromainguy
06/13/2019, 4:14 PMkioba
06/14/2019, 11:18 AMhttps://cdn-images-1.medium.com/max/1600/1*jZdYRvtKllXu0h0FiGG9Vw.png▾
romainguy
06/14/2019, 6:51 PMTristan Caron
06/14/2019, 7:07 PMromainguy
06/17/2019, 9:14 PMMatej Drobnič
06/18/2019, 5:32 AMViewDragHelper
and noticed that this code has a lot of state and calbacks interacting with each other (for example see all the touch callbacks in androidx.drawerlayout.widget.DrawerLayout
from androidx). I cannot fanthem how could such monstrosity be implemented with just composable functions.
Will there be a way to create classes for views or some other way to properly manage complex views like this?Vladimir Ivanov
06/19/2019, 10:21 AMVladimir Ivanov
06/19/2019, 12:20 PMLoránd
06/20/2019, 8:28 AMTristan Caron
06/20/2019, 8:19 PMSuraj Shah
06/22/2019, 1:08 PMinline
to inline lambdas in a function marked with @Composable
or does the annotation processor optimize it for you?Gil Goldzweig
06/22/2019, 2:46 PMMatej Drobnič
06/22/2019, 5:09 PMCompose has no specific notion of View IDs.Without that information, how can compose distinguish between "old item removed, new item inserted" and "old item updated" events to display proper animations (e.g in recycler-view like setting)?
Karen Ng
06/26/2019, 8:15 PMSiyamed
06/27/2019, 11:56 PMLeland Richardson [G]
06/29/2019, 5:49 PMLeland Richardson [G]
07/01/2019, 12:24 AMromainguy
07/01/2019, 2:41 PMpavi2410
07/04/2019, 2:39 PM@State var count = 0
while in Compose, val count = +state { 0 }
. Why such a hacky thing (+state
) is chosen?Arman Chatikayn
07/04/2019, 7:32 PMArman Chatikayn
07/07/2019, 1:15 PMdead.fish
07/08/2019, 10:54 AMTristan Caron
07/11/2019, 3:44 PMhttps://youtu.be/uW-Kk7Qpv5U?t=3265▾
dewildte
07/12/2019, 2:19 PMAntanas A.
07/17/2019, 9:33 AMJurriaan Mous
07/18/2019, 5:33 AMTristan Caron
07/18/2019, 2:44 PMrkeazor
07/19/2019, 12:42 AMvoddan
07/22/2019, 1:44 PMvoddan
07/22/2019, 1:44 PMChuck Jazdzewski [G]
07/22/2019, 4:00 PM1) ... structural limitationsNo. The data structure is an internal detail. We could switch to a different data structure if performance dictates. We have already switched twice before we went public.
2) What sources and methods ....Mostly experience with many different frameworks over our careers (for me personally this is my 6th framework). This, however, is just an observation and is not required for the performance of the system. Compose can handle large radical changes in the UI just a easily but we are optimizing around localized changes as that is what we believe will be most common.
3) Do you know of any use cases that are atypical for....Yes. Inserting and removing nodes at the beginning and end of the slot table in the same composition or any other form of non-local change. As the slot table is a flattening of the of a tree, any non-local changes to the tree will cause copying of the array as the buffer gap moves. If this is common we can introduce multiple gaps or using an internal tree; but, for now, we have a flat array with a single gap.
4) ...how hard will it be to switch...Not hard. We are keeping the data structure internal and only exposing an abstraction to the code generation to call. We have switched the implementation twice already without impacting the programming model. Even if the code generation takes a more active role (such as producing a scope record to avoid boxing) we still anticipate using the same API as the scope record could just be stored a
memo
like call.
We do plan some significant surface changes to the API, moving to a more of a code-flow approach instead of call interception, as explain in Leland's talk which will result in changes to the API the compiler uses but it will still be abstract enough to hide the flat vs. tree based data structure.voddan
07/23/2019, 12:59 AM