Kotlin Meta and CT programming vs D

Jo Blow JoBlow at dot.com
Sat Dec 21 19:06:12 UTC 2024


On Thursday, 19 December 2024 at 10:31:54 UTC, H. S. Teoh wrote:
> On Thu, Dec 19, 2024 at 06:04:33AM +0000, Jo Blow via 
> Digitalmars-d-learn wrote: [...]
>> I'm wondering if it would be worth the effort to try to get D 
>> to work with android studio since it can compile to all those. 
>> E.g., write the jetpack compose code in kotlin and hook up the 
>> business in with D somehow. If it wasn't too much trouble and 
>> worked well then this might give one the best of both worlds. 
>> JNI is a bit of a PIA when trying to call java from C because 
>> one has to use reflection for every aspect and it is very long 
>> winded. This probably could be simplified greatly with some D 
>> meta programming.
>
> Check out Adam Ruppe's jni.d.  It just about eliminates JNI 
> verbosity and makes working with Java actually temptingly 
> pleasant.
>
> Only caveat is that Adam has left mainline D and is maintaining 
> his own fork, so jni.d may or may not work with upstream D in 
> its present form. (Pre-fork versions of jni.d would work with a 
> compatible upstream D, though.)
>
>
> T

Ok, I'll try it if I ever get the urge to try to get D to 
work(maybe a different project). I want to start using 
multiplatform projects and maybe I'll try there once I get this 
one project done.

If I could essentially use D as a replacement for Kotlin I might 
jump back into D. Kotlin has a few very nice language features 
that D doesn't have that I'll miss but it's not really that 
relevant. Although, I think I might still prefer Kotlin because I 
doubt the IDE will work well with D.

There really should be some push to get D integrated into some 
major platform. Maybe D could be the "JNI language" for the 
Android platform?



More information about the Digitalmars-d-learn mailing list