-
Notifications
You must be signed in to change notification settings - Fork 454
Lesson One, ported to Kotlin #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Hi, any feedbacks? |
Hi, sorry, I'm not getting emails for any of these for some reason. I'll make a note to review everything and then get back to you. |
No problems, thanks! :) |
Hi, it generally looks good. Would it be possible to put the implementation under its own folder; i.e. android/kotlin/ ? That way the base lessons would stay in Java and follow the website, and we would have both implementations in parallel without having to add too much complexity to the code itself. |
I.e. /android/AndroidOpenGLESLessons There's also another PR that wants to add NDK support so this will help to keep things more separated and self-contained. |
Hi, yeah Sorry but I don't have so much time at the moment, I'll address this asap |
No worries at all, it was lingering for quite a while on my side too :) |
Hi, I tried to understand what you asked, so you want me to double all the files at the same level of Because given the full compatibility between Java and Kotlin in my opinion it wouldn't have much sense since it's possible to implement Kotlin by simply creating a kt file on the same side of java and choose the corresponding render based on preferences. But if you prefer that way, I can do it anyway |
Hi @elect86, it does mean more duplication, but I want the java code to remain in relatively close sync with the site and focused on one implementation which makes it easier for a newbie to pick up. You don't have to duplicate everything, only the lessons you actually ported so in this case that would be only lesson 1. |
Basically I want someone looking through or trying to compile the Java project to not have to worry about either Kotlin or the NDK if their environment doesn't support either one for whichever reason (although I'm aware that Kotlin is now "official" :)). It'd be better to just duplicate only the code and not the resources but I'm not sure right now of a way to do that without complicating the build or requiring users to be aware of those dependencies, so just duplicating everything seems to be the way to isolate things. |
I guess then in this case what you should do is simply using different branches:
If you are so keen on keeping the java code in close sync with the website and you don't want the user to care about the other 3 options, whatever he chooses, than a branch for each thematic shall be just perfect |
Hmm... branching can work but can also introduce its own complexity. I'm fine with the duplication for now! :) |
Ok, I'll do as you prefer I'll be back when I'm done ^^ |
Nice :) I'll wait for it -- no rush! |
Can you create a copy of that? Because I'm not so sure how to do that.. I tried and then I converted the class to Kotlin as I also did in the past, but whenever I try to run it, it crashes without a reason:
Idea doesnt show any error about it.. consoles are clear Edit: maybe I fixed it.. |
Oh hmm? Is it OK now? |
Do you want me to keep exactly the same names? Or can I rename Shall I also allocate the matrices just once and reuse or can I allocate new ones every |
Probably better to allocate the matrices just once and reuse, and the rename is OK with me! |
Hi,
I ported to Kotlin the first Lesson.
If it's fine, I'll go on with the others one :)