Optimizing nested recursion

Thanks for the head up on NIFs. I was able to find an example online and then put in my c code just to see if it would execute and it did successfully.

Given I do not want the Risk associated with NIFs, I think either Port or “C Node” would be the option. Is it correct that with Port I can only return string?

Some of the data I need returned is arrays with double data type and long data types.

Thanks,

Ports return anything. You can return a string, you can binary encode the erlang term format (which makes it really easy to parse any content on the erlang/elixir side), you can return raw binary in whatever custom format you want, anything. :slight_smile:

My answer was kind of tongue in cheek but interesting to hear they are enabled by default in OTP 20!