notjack
2020-6-21 09:30:07

I think the two require chunks is worth it to have the provide as close to the top as possible


notjack
2020-6-21 09:30:50

it turns into three chunks as soon as you have a test submodule anyway


sorawee
2020-6-21 12:13:20

I guess an alternative question is, why can’t provide be automatically moved to the end of the module?


rokitna
2020-6-21 13:36:11

I’m currently in the habit of putting the requires in one chunk at the top of the file, including some lines like (module+ test (require ...)) if I’m using module+. I think it’s just a combination of Java habits and wanting to keep track of the full set of dependencies for a file so I’ll be able to tell how much work a port to another language will be.


samth
2020-6-21 19:50:23

@sorawee it could but then you have weird expression and expansion evaluation order


samth
2020-6-21 20:18:39

also, since provide is a macro, you have to decide who moves it, and what counts as a provide