- Podcasts
- Processing in Idea
- Processing with Kotlin 3/4 - repeat, operator overloading
Processing with Kotlin 3/4 - repeat, operator overloading
Processing in Idea
- March 18, 2021
About this episode
After converting an existing Processing+Java program to Processing+Kotlin, we change the code a bit to make it less Java-ish and more Kotlin-like. Some call this "making the core more idiomatic".
The program we converted is this one:
https://github.com/hamoid/Fun-Programming/tree/master/processing/ideas/2020/03/irregularLineBetweenTwoPoints
00:00 Convert while() loop into repeat()
01:44 Convert a second while() loop into repeat()
04:09 Define the PVector times Float operation (operator overloading)
Kotlin documentation: https://kotlinlang.org/docs/home.html
You can play with Kotlin without downloading anything at https://play.kotlinlang.org/ (but only text output, no graphics).
More Processing & Idea videos: https://tubedu.org/c/processing_in_idea
Ask questions and access extra content at https://patreon.com/funprogramming