I, uh, actually kind of like the idea. If you just visually converted primitives to a toggle after you type true/false, and let you delete it like any other text, it could be a small convenience on any flags you might change during the development process.
Programmer Humor
Post funny things about programming here! (Or just rant about your favourite programming language.)
Rules:
- Posts must be relevant to programming, programmers, or computer science.
- No NSFW content.
- Jokes must be in good taste. No hate speech, bigotry, etc.
As long as it's not literally a toggle that you can interact with.
I can only imagine the horrors of accidentally clicking in the editor while selecting some text and quietly changing certificateIsValid = false;
to true
or something like that.
Nah, make it a keybind like alt-shift-click and give it a deafening sound like throwing an industrial breaker.
I mean this as a joke but you might be right. A quick search suggests that no one implemented something like this yet.
As a visual indicator, sure.
Oh, I could easily see a trainwreck of an implementation. But if this was just a display option like color coding keywords and variables, but you could click to change the underlying true/false? I might add it.
More technical details in the full article ;)
Beatiful. Magnificent indeed
To actual posisble implementations, it'd actually be interesting as an indicator next to the bool to make it easier to see when debugging
I used an extension a while ago that changed CSS colour values (#ababab) into little coloured dots, that became a colour picker when clicking on them (while still letting you input RGB or Hex, ofc), and it was pretty awesome!
So, I could unironically see this being really nice. Although... I think this would need a pretty narrow context, something like if x == true
would look pretty confusing as a toggle, I imagine. But assigning x = true
? Bring it on.
Good point. I actually thing that having if x == true
is bad practice anyway because it's redundant, so showing a toggle in that context would have the benefit of highlighting that something's wrong.
It looks neat, but I think I'll keep my true
and false
. I don't like chhannngggeeee!
Sounds like some condiment for the spaghetti.
MATLAB does this...
Grep -Irn "green toggle thingy" ./*