this post was submitted on 02 Dec 2024
15 points (100.0% liked)
programming
255 readers
1 users here now
-
Post about programming, interesting repos, learning to program, etc. Let's try to keep free software posts in the c/libre comm unless the post is about the programming/is to the repo.
-
Do not doxx yourself by posting a repo that is yours and in any way leads to your personally identifying information. Use reports if necessary to alert mods to a potential doxxing.
-
Be kind, keep struggle sessions focused on the topic of programming.
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
This is my kotlin script for part 2
I'm still only learning kotlin. In my opinion it's pretty shitty code due to the long call chains. I imagine to make it better I should probably break up those chains, assigining the intermediate values to different variables, to make it more readable. Do you agree and is there other stuff that you think ought to be improved?
Prefix with I don't know much about Kotlin except that its a JVM language. It looks like you are programming in a functional style more than a OOP or imperative style. So in an imperative style you would have more intermediate values, but in a function style you are trying to reduce unnecessary intermediate values and have the output of one function pipe into the next function in the chain.