Remix.run Logo
tom_ 3 hours ago

Bleep bloop. This has always bothered me for one. Bools for unnamed parameters just always end up a bit of a pain.

1. Somewhat often, parameter hints just stop working. Why? Who knows! There never seems to be any way to debug these mechanisms. They just stop working and you're forced to do stuff like delete random cache folders or toggle random options, as suggested by randos from Stack Overflow posts in 2017, until it maybe starts working again (for now)

2. Parameter hints sometimes aren't available when you need them. Xcode, for example, only seems to be able to put them inline, as text in the document that you replace with the arguments, something available only when writing code. You can't get them to pop up on demand as a reader as you can with, say, Visual Studio

3. You might be examining the code in some kind of review UI, rather than a code editor, in which case you're going to have to do some back and forth. You might be right in the middle of something yourself, and not in a position to retrieve the code locally to examine it in the usual editing environment. (I don't think you should go overboard optimising for this case, but I think it worth considering)

4. From the type checker perspective, all bools are equivalent. If you pass "false" for one bool parameter, then you could just as well pass that same "false" for another one - complicating rearranging or adjusting parameters, because, depending on the type of change you make, you may not get a good set of diagnostics to work through. And it gets worse if you've got defaulted or optional parameters