George
09/20/2022, 12:22 PMgetAccount(): Accounts
do you prefix your entities or not? Thanks in advance for any answer !mbonnin
09/20/2022, 12:24 PMExampleAccount
vs just Account
?George
09/20/2022, 12:24 PMmbonnin
09/20/2022, 12:24 PMmbonnin
09/20/2022, 12:25 PMBuffer
, Source
, Sink
mbonnin
09/20/2022, 12:25 PMGeorge
09/20/2022, 12:28 PMJavier
09/20/2022, 12:30 PMas
on the importJavier
09/20/2022, 12:30 PMimport foo.bar.Baz as Baz2
mbonnin
09/20/2022, 12:30 PMmbonnin
09/20/2022, 12:31 PMIf i prefix only the most common (ExampleAccount) ones and the other which the conflict is quite hard to happen to leave them as they are, it would be weird?I'd vote for consistency first but then again OkHttp is a counter-example. They have
OkHttpClient
and Response
mbonnin
09/20/2022, 12:32 PMJavier
09/20/2022, 12:32 PMRob Elliot
09/20/2022, 12:32 PMimport com.mything.web
import com.bank
val webAccount: web.Account
val bankAccount: bank.Account
to having to alias as you would in Kotlin.Javier
09/20/2022, 12:33 PMJavier
09/20/2022, 12:35 PMGeorge
09/20/2022, 12:36 PMRob Elliot
09/20/2022, 12:39 PMGeorge
09/20/2022, 12:40 PMval myServer = org.x.myProject.workhorse.entities.Server
Rob Elliot
09/20/2022, 12:41 PMJavier
09/20/2022, 12:41 PMJavier
09/20/2022, 12:41 PMRob Elliot
09/20/2022, 12:42 PMjessewilson
09/20/2022, 1:28 PMRequest
, Call
, Json
, Path
• don’t be afraid of short package names okio
, okhttp3
jessewilson
09/20/2022, 1:29 PMcom.mycompany
prefix in their naming, and as far as I know the actual collisions in practice don’t comejessewilson
09/20/2022, 1:30 PMokio.Path
and java.nio.file.Path
, you can just fully-qualify the Okio one