Does Kotlin/Native have direct memory access as C


#1

Hi all,

I cannot find information where is explicitly explained does kotlin native have direct memory access as C language? What I mean by that is: C has pointers and memory allocation, so I am wondering if Kotlin has that feature too?

thanks :slight_smile:


#2

Yes.


#3

So, Kotlin Native is new C?

thanks :slight_smile:


#4

Direct memory management should be avoided whenever it is possible. Kotlin is a high level language, and I think it is generally bad idea to use it in some low level problems, where you need direct memory access. If you want to go to the system level you probably better stick with system languages like Rust (by the way syntax is similar to kotlin, so I think it is a good idea to lern them both).