jimn
12/15/2019, 10:19 AM"string".size
unreasonable as a stdlib feature?Thomas
12/15/2019, 10:41 AM"string".length
?jimn
12/15/2019, 10:43 AMjimn
12/15/2019, 10:43 AMkarelpeeters
12/15/2019, 2:25 PMjimn
12/15/2019, 2:26 PM"string".size
unreasonable as a stdlib feature?karelpeeters
12/15/2019, 2:27 PMlength
and count()
. But my "what" was more a reaction to your two other comments, what are you talking about?jimn
12/15/2019, 2:28 PMjimn
12/15/2019, 2:29 PMjimn
12/15/2019, 2:36 PMjimn
12/15/2019, 2:40 PMkarelpeeters
12/15/2019, 2:43 PMJames Gosling's absent minded choice to use size in one place and length in another is a good thing because it's what came first?Yes, sometimes it's better to just keep what's already there instead of constantly making trivial changes for tiny cosmetic improvements.
jimn
12/15/2019, 2:43 PMMike
12/15/2019, 2:43 PMMike
12/15/2019, 2:44 PMkarelpeeters
12/15/2019, 2:45 PMlength
and size
interchangeably within the same codebase.jimn
12/15/2019, 2:45 PMYes, sometimes it's better to just keep what's already there instead of constantly making trivial changes for tiny cosmetic improvements. (edited)i forgot we're in #java on efnet and not the kotlin slack
jimn
12/15/2019, 2:51 PMjimn
12/15/2019, 2:56 PMserebit
12/15/2019, 7:38 PMserebit
12/15/2019, 7:40 PMDmitry Kandalov
12/15/2019, 10:40 PMString.length
and making it .size
.diesieben07
12/16/2019, 8:56 AMlength
implies indices for me (an array has length). size
doesn't (for e.g. Sets).jimn
12/16/2019, 9:12 AMjimn
12/16/2019, 10:21 AMDmitry Kandalov
12/16/2019, 10:42 AM.length
to .size
could probably be done within two major versions with no additional runtime cost.Dmitry Kandalov
12/16/2019, 10:45 AM