Why does BuckleScript converts object to JS array?


#1

For examle:
let me: School.person = {age: 20, name: “Big Reason”};

becomes:
var me = /* record /[
/
age /20,
/
name */“Big Reason”
];

I mean, creation of Array where all elements have different type is not efficient in V8 context.


#2

There’s some discussion about this here: https://github.com/BuckleScript/bucklescript/issues/2922