
What is a natively compiled non-GC lang. for Android? - nurettin
I&#x27;ve been searching for a language to implement a game I had in mind. The problem with java on android: When GC runs, I get a weird world-stopping delay. The game requires continuous interaction with the touch screen, so users could be dismayed by these random stutters that happen every 20-30s. (I&#x27;ve checked with a memory profiler, I don&#x27;t have any object allocations within tight loops, so I blame java for that randomness.)<p>The problem with C++: I love it. Especially after what they did with C++11. And with C++14 we even have polymorphic lambdas. Coding in C++ can be elegant provided that I&#x27;ve coded enough abstractions over the data structures and algorithms I need. That&#x27;s why I won&#x27;t touch C++. This project will never finish.<p>The problem with Free Pascal: Having worked with Delphi some of my professional life, I gave free pascal+LazSDL2 a go. Turns out it works great on android. (no world stopping delays). But it isn&#x27;t the most elegant language. I know, because I&#x27;m a ruby person.<p>Go, Crystal, Nim, I fear their garbage collection schemes will end up doing the same thing as android&#x27;s Java implementation.<p>I&#x27;m just one person, don&#x27;t have the time to evaluate the whole world. Does HN have a suggestion?
======
nabla9
Have you considered doing manual memory management in GC language?

Create your own memory pool and use your own new() and free() functions just
like with C/C++. When you free() memory it goes back to the object pool and is
recycled.

~~~
nurettin
I haven't considered creating my own thread safe custom memory management
routines. I would probably get lost in the details instead of making a game.

