Quantcast
Channel: ReScript Forum - Latest posts
Viewing all articles
Browse latest Browse all 2592

Remove non-Js aliases for certain types?

$
0
0

right, the point i’m trying to make is that it’s not clear whether a type in rescript can be trusted to be compatible with js or not. how can i know that Date is, but Option isn’t (really)? what about Dict, is it a custom implementation of a dictionary or a plain js object? how can i know? in the long run, how can i know that Dict will remain a plain js object? this is important for ffi which expects js objects as dictionaries? maybe Dict should have Dict.toJsObject or similar? likewise, how do i know that Date is actually a js date and not some custom date implementation?

the question at its core is probably something like: how do i know which parts of the stdlib are pulled in from js (zero-cost ‘abstractions’) vs custom implementations?


Viewing all articles
Browse latest Browse all 2592

Trending Articles