Size: a a a

2021 January 21

SS

Slava Savitskiy in ctodailychat
да, из питерского офиса видимо
источник

AP

Alexander Panko in ctodailychat
я вот с недавнего времени стал отчетливо замечать эту пропасть в коммуникации
источник

AP

Alexander Panko in ctodailychat
и в резюме
источник

D

Denys in ctodailychat
Slava Savitskiy
когда к нам в Стокгольм приезжала девушка из джетбрейнс на митап рекламировать котлин, первый вопрос от бородатых джавистов был а че у вас там с дефолтной видимостью так вышло. Девушка ответила что-то типа не хотите, не пишите, и джависты в перерыв дружно свалили 😀
А они effective java читали? :)
источник

SS

Slava Savitskiy in ctodailychat
Denys
А они effective java читали? :)
джависты или джетбрейнисты? 😀
источник

D

Denys in ctodailychat
Slava Savitskiy
джависты или джетбрейнисты? 😀
Джависты
источник

SS

Slava Savitskiy in ctodailychat
ну я читал, что ты имеешь в виду. там вроде было написано делать визибилити минимальной
источник

D

Denys in ctodailychat
Это ж первопричина некоторых языковых решений
источник

SS

Slava Savitskiy in ctodailychat
стопудово новые программисты на котлине и свифте не читали никаких эффектив че-то там и все понапишут в паблик </troll>
источник

D

Denys in ctodailychat
My bad. Публичная видимость связана с избавлением от излишней церемониальности.
http://blog.jetbrains.com/kotlin/2015/09/kotlin-m13-is-out
источник

D

Denys in ctodailychat
Slava Savitskiy
стопудово новые программисты на котлине и свифте не читали никаких эффектив че-то там и все понапишут в паблик </troll>
Недавно завезли strict режим для разработчиков библиотек. Можно настроить чтобы компилятор орал, если не указано явно.
источник

SS

Slava Savitskiy in ctodailychat
да, я читал это
источник

SS

Slava Savitskiy in ctodailychat
This may seem controversial that we chose public as default visibility. Kotlin being a type-safe language, choosing the safest option, private, by default may seem more logical. And we totally realize there are valid arguments in favour of this default. But Kotlin is also a pragmatic language. I’ll try to explain briefly why we believe public is the right default.

In real Java code bases (where public/private decisions are taken explicitly), public occurs a lot more often than private (2.5 to 5 times more often in the code bases that we examined, including Kotlin compiler and IntelliJ IDEA). This means that we’d make people write public all over the place to implement their designs, that would make Kotlin a lot more ceremonial, and we’d lose some of the precious ground won from Java in terms of brevity. In our experience explicit public breaks the flow of many DSLs and very often — of primary constructors. So we decided to use it by default to keep our code clean.
источник

AP

Alexander Panko in ctodailychat
“explicit public breaks the flow of many DSLs and very often — of primary constructors” вот тут бы пример неплохо бы смотрелся
источник

D

Denys in ctodailychat
Alexander Panko
“explicit public breaks the flow of many DSLs and very often — of primary constructors” вот тут бы пример неплохо бы смотрелся
Праймари конструктор в Котлине совмещен с декларацией класса
источник

AP

Alexander Panko in ctodailychat
Denys
Праймари конструктор в Котлине совмещен с декларацией класса
ааа
источник

D

Denys in ctodailychat
class Foo(val bar: String) {}
источник

AP

Alexander Panko in ctodailychat
Slava Savitskiy
This may seem controversial that we chose public as default visibility. Kotlin being a type-safe language, choosing the safest option, private, by default may seem more logical. And we totally realize there are valid arguments in favour of this default. But Kotlin is also a pragmatic language. I’ll try to explain briefly why we believe public is the right default.

In real Java code bases (where public/private decisions are taken explicitly), public occurs a lot more often than private (2.5 to 5 times more often in the code bases that we examined, including Kotlin compiler and IntelliJ IDEA). This means that we’d make people write public all over the place to implement their designs, that would make Kotlin a lot more ceremonial, and we’d lose some of the precious ground won from Java in terms of brevity. In our experience explicit public breaks the flow of many DSLs and very often — of primary constructors. So we decided to use it by default to keep our code clean.
то есть грубо та же причина что и у моего разрабочтика, писать много))
источник

D

Denys in ctodailychat
Alexander Panko
то есть грубо та же причина что и у моего разрабочтика, писать много))
Но пакеты то есть! 😁
источник

D

Denys in ctodailychat
И тернарника нет и не будет. А это - писать длиннее.
источник