Hi all!
So question in topic.
Erlang/OTP 24 [erts-12.2.1] [source] [64-bit] [smp:16:16] [ds:16:16:10] [async-threads:1] [jit]
Eshell V12.2.1 (abort with ^G)
1> erlang:term_to_binary({a,[1,2,3]}).
<<131,104,2,100,0,1,97,107,0,3,1,2,3>>
Erlang/OTP 26 [erts-14.0.2] [source-672bd95480] [64-bit] [smp:16:16] [ds:16:16:10] [async-threads:1] [jit:ns]
Eshell V14.0.2 (press Ctrl+G to abort, type help(). for help)
1> erlang:term_to_binary({a,[1,2,3]}).
<<131,104,2,119,1,97,107,0,3,1,2,3>>
ei_x_buff buf;
ei_x_new(&buf);
ei_new_format(&buf, "{a,[1,2,3]}");
// buf.buff: 131,104,2,119,1,97,108,0,0,0,3,97,1,97,2,97,3,106
Why not use sole interface across whole OTP to “binarize” terms?