Thanks for your answer. I agree with you about the benefits of a declarative API. I just can't see why instantiating something modal would be unsafe. After all, being a new instance, it is not a part of the declarative content of the parent window and it is tedious and verbose to use it in a declarative way. You have to explicitly manage a whole state to control the dialog visibility that otherwise would be implicit in an imperative way.
All being said, I was just wondering why Dialog was not imperative as Window. Maybe I can't see yet the whole picture of this new declarative world and I’m missing something but it is what it is and I can live with it being declarative...
By the way, congratulations on JetBrains compose. I’m loving it.