Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
yoz-y
on May 18, 2017
|
parent
|
context
|
favorite
| on:
Swift is like Kotlin
1..5 syntax has been deprecated for about 2 years, now you have 1...5 which is inclusive and 1..<5 which excludes the last element.
bpicolo
on May 18, 2017
|
next
[–]
does it work with expressions? foo()...bar()? I can count on no fingers the amount of times I've hardcoded the length of a loop in production code.
yoz-y
on May 18, 2017
|
parent
|
next
[–]
Yes it does. (both ... and ..< can be used with expressions that return an int)
masklinn
on May 18, 2017
|
prev
[–]
I was talking about Kotlin here.
yoz-y
on May 18, 2017
|
parent
[–]
Ah, I read your comment badly, sorry.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: