Is it just me, or is "side effect" in Compose weir...
# compose
p
Is it just me, or is "side effect" in Compose weirdly named? Usually, outside of compose world, side effect is kind of undesired behavior you would want to avoid.
f
I mean... that's pretty spot on. You also want to avoid SideEffects in Compose 😄 But sometimes you have to use them 🤷
l
Not sure I'd go that far to say that "side effects" is something to be avoided. For sure in the context of pure functions, but without side-effects you likely will not have a very useful software. For me it's about knowing where they happen, and potentially grouping them on specific parts of the system, so that the rest can be tested in an easier way
l
It's so common that people misunderstand "side effects". In short "side effects" do not imply bad things. They just come with "main effects" which are often what people desire, but it doesn't mean main ones are all good and side ones are all bad. Side effects can be good or essential sometimes.
c
I'm with Filip. I always thought sideEffects meant "youre doing something kinda bad". But maybe that mostly came from RxJava?
m
yeah, the name is kind of: you're taking a medicine, but be aware of side effects