kirillrakhman
05/13/2016, 2:12 PMkirillrakhman
05/13/2016, 2:13 PMmartinb
05/13/2016, 2:15 PMmatcher.group(1).length()
yole
05/13/2016, 2:15 PMyole
05/13/2016, 2:16 PMmartinb
05/13/2016, 2:19 PMmatcher.group(1).length()
shows warning Method invocation 'length' at line 111 may produce 'java.lang.NullPointerException'
kirillrakhman
05/13/2016, 2:20 PMkirillrakhman
05/13/2016, 2:21 PMkirillrakhman
05/13/2016, 2:22 PMmartinb
05/13/2016, 2:24 PMinline fun Matcher.group_(i: Int):String? = this.group(i)
. The first solution is not realistic, and the second solution requires us to always call matcher.group_(1).length()
instead of matcher.group(1).length()
yole
05/13/2016, 2:26 PMyole
05/13/2016, 2:27 PMmartinb
05/13/2016, 2:28 PMRegex
doesn't have methods appendReplacement()
and appendTail()
martinb
05/13/2016, 2:29 PMkirillrakhman
05/13/2016, 2:30 PMyole
05/13/2016, 2:30 PMreplace()
with a lambda instead of appendReplacement()
and appendTail()
yole
05/13/2016, 2:30 PMRegex
impacts Java interop. you don’t need to expose it in your APImartinb
05/13/2016, 2:36 PMmartinb
05/13/2016, 2:38 PMkirillrakhman
05/13/2016, 2:39 PM!!
, ?:
, require
, assert
and so onkirillrakhman
05/13/2016, 2:40 PMmartinb
05/13/2016, 2:41 PMyole
05/13/2016, 2:42 PMyole
05/13/2016, 2:42 PMMutableList
involves a lot of special-case hacks in the compiler, and it’s not clear how it could be exposed in a generic way and whether this would be a good idea at allmartinb
05/13/2016, 2:50 PMkirillrakhman
05/13/2016, 2:50 PMmartinb
05/13/2016, 2:51 PMkirillrakhman
05/13/2016, 2:51 PMmartinb
05/13/2016, 2:52 PMkirillrakhman
05/13/2016, 2:52 PM