aarjav
11/28/2018, 5:48 PMigor.wojda
12/06/2018, 1:45 PMiterator
in Iterable
is a method, not a property?rrader
12/06/2018, 4:07 PMfcosta
12/06/2018, 5:59 PMpattern matching
feature like other languages have like Elixir?tevjef
12/10/2018, 7:41 PMfun a(): Unit
== fun a()
but this doesn't:
fun b(G: Unit)
!= fun b()
Slackbot
12/11/2018, 8:15 AMjosephivie
12/13/2018, 2:44 AM#
at the end to indicate that you expect a mutable thing rather than a frozen thing.
I haven’t thought this all the way through yet. There might be some big problems with that.
I just see immutability issues being a huge problem for Kotlin Native in the future unless we have some language features to prevent some common issues.xenoterracide
12/27/2018, 7:23 PMval modules = listOf(
"ph-db-migration",
"ph-emr-entity",
"ph-emr-event-type",
"ph-events",
"redox",
)
you probably wouldn’t write this like this, but it makes the last comma more obvious
val modules = listOf( "ph-db-migration", "ph-emr-entity", "ph-emr-event-type", "ph-events", "redox",)
would compile to the same thing as
val modules = listOf( "ph-db-migration", "ph-emr-entity", "ph-emr-event-type", "ph-events", "redox")
xenoterracide
12/30/2018, 6:01 AMxenoterracide
12/30/2018, 6:03 AMnatpryce
01/02/2019, 10:45 AMobject
expression should return the object’s name without the ‘@<id>’ suffix.breandan
01/05/2019, 3:57 AMKotlin should automatically choose lambda expressions with a single argument over multiple arguments for the implicit case. You should not need to specify an explicit lambda signature in order to usehttps://github.com/kotlintest/kotlintest/pull/506#issuecomment-451624300when competing overloads all have higher arity.it
jw
01/07/2019, 7:33 PM: Enum<T>
which (combined with inline
) lets me do T -> String
and String -> T
conversion. It would be nice to achieve similar T -> V
and V -> T
conversions with an inline type (where V
is the property type) in a generic way. Right now I'm using a factory where you have to pass ::Foo
and Foo::property
as arguments which leaves a lot to be desired.Marc Knaup
01/09/2019, 12:54 PMMarc Knaup
01/09/2019, 12:57 PMUsername
to an EmailAddress
for example.diesieben07
01/09/2019, 1:21 PMtypealias
😉Olekss
01/09/2019, 8:45 PMOlekss
01/09/2019, 9:11 PMOlekss
01/09/2019, 9:12 PMkioba
01/11/2019, 4:45 PMdef listToString(list: List[String]): String = list match {
case s :: rest => s + " " + listToString(rest)
case Nil => ""
}
would it make sense to add a similar pattern matching for the destructuring declaration?
the example above could be replaced with `fold`/`reduce` and mixing it with windowed
but if the list length is zero we would get an exception
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
with pattern matching this could be automatically run to the case Nil => ""
. The compiler also could check for unsatisfied cases just like it does right now when we match agains for enum or sealed class typesMarc Knaup
01/12/2019, 10:25 AMpackage
directive from all Kotlin files of a project then a compiler option allows specifying the same package name for all Kotlin files instead of using the root package. So I can stop repeating myself.xenoterracide
01/14/2019, 11:07 PMtest
on a class makes the class internal, and so that you can't directly call any constructors. on a method it would make it internal (is this a thing for a method?). Motivation, avoid ID10T errors involving trying to new up the test in your code, vs trying to new up the class under test 😕 also the internal keyword is long and test reads better.Ruckus
01/17/2019, 6:07 PM=
on any var infix function that returns the receiver's type (or compatible):
// Current
var superAwesomeNumber = 5
superAwesomeNumber = superAwesomeNumber shl 3
// New
var superAwesomeNumber = 5
superAwesomeNumber shl= 3
It would be nice for long chains of bitwise operators, but it could also be nice for any infix function. It is especially appealing when you use very descriptive names.cedric
01/18/2019, 5:32 PMdbg!()
macro looks pretty useful, I was wondering if it would be possible to replicate it in Kotlin. This would require being able to capture the text form of the expression. https://blog.rust-lang.org/2019/01/17/Rust-1.32.0.htmlcbruegg
01/20/2019, 12:53 PMelect
01/21/2019, 9:54 AM@JvmOverloads
on interface methods?josephivie
01/24/2019, 5:33 PMjosephivie
01/28/2019, 9:15 PMSlackbot
01/28/2019, 10:18 PMMatej Kormuth
02/03/2019, 12:06 AMit
or similar variable in else
clause of when
control structure.
when (a()) {
1 -> b()
2 -> c()
else -> d(it)
}