Remix.run Logo
empath75 4 hours ago

You can tell it was written by claude after just a few sentences, really.

chickenimprint 3 hours ago | parent | next [-]

Even the premise is ridiculous, inlay hints for parameter names have existed for a really long time. What human using a code editor could come up with this "problem"? The comments all seem to be nodding along and even suggesting absolutely hare-brained code like "const isThing = true; ...". I feel like I'm losing my mind. How many interactions on this site are sill organic? Am I talking to a bot right now?

tom_ 3 hours ago | parent | next [-]

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

gcmeplz 3 hours ago | parent | prev [-]

yeah, I immediately came to the comment section to look for inlay hints, and your comment is the only one that mentions them. I guess many people might not be aware that they're a standard editor option?

fwiw, while inlay hints are great, they don't work in either git-delta or github, so they're not availabe in a good chunk of the places that I'm looking at code, so for TypeScript, I do lean towards object arguments with keys the way the article suggests.

Jtarii 2 hours ago | parent | prev [-]

The comically unncessary section headers are also incredibly LLM coded.