News for hackers. Stuff that matters.
Re:Don't Use Booleans by presentation on Monday July 08, 2024 @07:15PM (#40910798)
You can actually set up VSCode and probably other editors to show the parameter names inline with the values.
Re:Don't Use Booleans by nine_k on Monday July 08, 2024 @07:18PM (#40910824)
Same for JetBrains IDEs.
Re:Don't Use Booleans by someoneontenet on Monday July 08, 2024 @08:00PM (#40911120)
How is this done for js?
Re:Don't Use Booleans by thamer on Monday July 08, 2024 @08:45PM (#40911441)
As far as I know it is not a native feature, but inline hints for parameter names can be added with a VSCode extension called "Inline Parameters for VSCode": https://marketplace.visualstudio.com/items?itemName=liamhamm...

The only languages it supports are JavaScript, TypeScript, PHP, and Lua. I can confirm that it works for JavaScript and TypeScript, I haven't tried the other two.

A similar extension named "Inline Parameters Extended for VSCode" supports a different set of languages: Golang, Java, Lua, PHP, and Python. It seems to be a fork of the aforementioned.

Re:Don't Use Booleans by xigoi on Tuesday July 09, 2024 @01:42PM (#40918833)
I hate inlay hints because they usually add unnecessary clutter. I prefer to use languages that allow you to add them manually when needed.