Marxism-Fennekinism@lemmy.ml to Programmer Humor@lemmy.mlEnglish · 2 years agoOur social interaction in a nutshelllemmy.mlimagemessage-square22fedilinkarrow-up1500arrow-down118
arrow-up1482arrow-down1imageOur social interaction in a nutshelllemmy.mlMarxism-Fennekinism@lemmy.ml to Programmer Humor@lemmy.mlEnglish · 2 years agomessage-square22fedilink
minus-squarenieceandtows@programming.devlinkfedilinkEnglisharrow-up64·2 years agoShould have used python. The answer is youme.
minus-squareLeftRedditOnJul1@lemmy.worldlinkfedilinkarrow-up12·2 years agoThe answer is NameError: ‘you’ is not defined
minus-squareSquare Singer@feddit.delinkfedilinkarrow-up10·2 years agoOnly if you put “you” and “me” in quotation marks.
minus-squarebalance_sheet@lemmy.worldlinkfedilinkarrow-up5·2 years agoIt’s a variable created when the conversation started.
minus-squareZagorath@aussie.zonelinkfedilinkEnglisharrow-up3·2 years agoMost languages support concatenation of strings using the + operator. The only mainstream languages I can think of that don’t are PHP (which uses “.”) and low-level languages like C & C++.
minus-squareVanillaGorilla@kbin.sociallinkfedilinkarrow-up3·2 years agoJavaScript might even concatenate some integers instead of adding them just for shits and giggles.
minus-squaremeteorswarm@beehaw.orglinkfedilinkEnglisharrow-up1·2 years agoC++ does, but it’s not a very efficient operation. https://en.cppreference.com/w/cpp/string/basic_string/operator%2B
minus-squareEiim@lemmy.blahaj.zonelinkfedilinkEnglisharrow-up1·2 years agoR uses paste0() for some reason
minus-squareRikudou_Sage@lemmings.worldlinkfedilinkarrow-up1arrow-down1·2 years agoC++ does as well, doesn’t it? Though I don’t often use std::string, so I’m not sure. But every other string type I worked with had + overloaded.
Should have used python. The answer is youme.
The answer is NameError: ‘you’ is not defined
Only if you put “you” and “me” in quotation marks.
It’s a variable created when the conversation started.
Most languages support concatenation of strings using the + operator. The only mainstream languages I can think of that don’t are PHP (which uses “.”) and low-level languages like C & C++.
JavaScript might even concatenate some integers instead of adding them just for shits and giggles.
Lua uses
..
C++ does, but it’s not a very efficient operation. https://en.cppreference.com/w/cpp/string/basic_string/operator%2B
R uses
paste0()
for some reasonC++ does as well, doesn’t it? Though I don’t often use std::string, so I’m not sure. But every other string type I worked with had + overloaded.