bcpeinhardt / simplifile

Simple file operations for Gleam that work on all targets (Erlang/Node/Deno)
71 stars 10 forks source link

Remove target annotation #32

Closed giacomocavalieri closed 2 months ago

giacomocavalieri commented 2 months ago

Hello! I noticed simplifile uses quite a lot of target annotations, that is highly discouraged.

simplifile is a great package and my guess is a lot of people interested in ffi will probably have a look at its source code so I think it's for the best to follow Louis' recommendation to never use target and set a good example on how to write ffi for two targets at the same time.

This PR:

bcpeinhardt commented 2 months ago

Ah weird, I didn't realize you could import stuff from your own build dir into your ffi, but yeah that cleans things up nicely, thanks @giacomocavalieri, fabulous as always 😄