https://kotlinlang.org logo
#feed
Title
# feed
s

sss

03/15/2017, 3:33 PM
r

robin

03/15/2017, 3:59 PM
The last two issues in that article have a point, but the other things mentioned just show a poor understanding of the available language constructs.
👍 1
t

thomasnield

03/15/2017, 4:00 PM
Hmm... blasphemy. Excommunicate this individual from the Kult of Kotlin.
😂 3
l

lupajz

03/15/2017, 4:01 PM
What does he even mean with that
for
problem ? Running the code I see similar results
r

robin

03/15/2017, 4:03 PM
Yeah, that puzzled me, too. After reading it I still have no idea what his problem with
for
in kotlin is, or why he went to implement that weird
For
function.
t

thomasnield

03/15/2017, 4:04 PM
Don't want to digress, but how many folks actually use Loops often?
r

robin

03/15/2017, 4:05 PM
Not that often, really, especially with the extensive extensions functions for the collections. But I still wouldn't want to go full haskell and do all iteration via recursion 😉
c

curioustechizen

03/15/2017, 4:06 PM
Lack of array and map literals is something that bothers me too. And of course, every time I read anything more than the simplest code using generics, I am left bewildered and confused. But the rest - I don’t understand the problems.
n

nfrankel

03/15/2017, 4:17 PM
I think that’s good that in everything, there’s contradiction i didn’t read the article in full but in all cases, contradiction brings improvements
r

rwachol

03/15/2017, 4:45 PM
some languages has much powerful
for
that’s what he means
d

dalexander

03/15/2017, 4:59 PM
I think that the for statement could be improved, and that he found some interesting edge cases with generics (by ignoring a compiler warning…). Otherwise much of the article looks to me like what I worry about when writing certain technical things: that someone who knows more than the writer will see the author as hopelessly ignorant. The lack of collection literals don’t bother me though, unlike some of the other people in this thread.
r

robin

03/16/2017, 7:58 AM
@rwachol From what I gathered he compared it to the normal for-loop in Java, though... Any example on one of those more powerful
for
in other languages?
r

rwachol

03/16/2017, 8:08 AM
I know about Scala for sure. Rust’s for works also on interator, and probably haskell 🙂
t

thomasnield

03/16/2017, 3:32 PM
Python can use
for
loops that
yield
, but why would you want to do that when you have Sequences, Streams, Rx Observables, etc...
r

robin

03/16/2017, 3:36 PM
yield
isn't tied to
for
though, and we'll be able to do
yield
as well with coroutines 🙂
r

rwachol

03/16/2017, 3:52 PM
@thomasnield flat mapping monads!
v

v0ldem0rt

03/17/2017, 8:03 PM
I think he is asking for C/C++ syntax. Has been pounded enough on HN