Comment on I'm creating a curated search engine for web developers. Asking for a feedback
sznowicki@lemmy.world 6 months agoIf it has it’s totally accidental.
What’s the use case for searching for those kind of symbols? I’ll check if I can tune it for this.
towerful@programming.dev 6 months ago
When you want to know the name of the operator for a language.
Like “what does & mean in c++?”.
&
isn’t too bad, but some of them can be difficult (like “JavaScript ??”).And if you don’t know it’s called a reference operator, or a bullish coalescence operator, or whatever… Trying to learn what it does can be downright impossible
sznowicki@lemmy.world 6 months ago
For ?? I guess it already has a decent results. I’ll periodically check those kind of cases once the index gets more languages.
kukei.eu/?q=js+%3F%3F+operator
themusicman@lemmy.world 6 months ago
?? is intuitive if you (truly) understand ||
xmunk@sh.itjust.works 6 months ago
Yea, I don’t know why people want to learn things - it’s easier to just know them! /s
kryptonianCodeMonkey@lemmy.world 6 months ago
Have you tried divining syntaxes from reading the entrails of a sacrificed goat?
themusicman@lemmy.world 6 months ago
What? The previous comment said it’s “downright impossible to learn” which is nonsense.
|| means “Evaluate and use the left operand, unless it’s falsy, in which case evaluate and use the right operand instead”
?? means “Evaluate and use the left operand, unless it’s nullish, in which case evaluate and use the right operand instead”
They’re the same thing except for which values fall through to the second operand