HiddenLayer555@lemmy.ml to Programmer Humor@programming.devEnglish · edit-22 months agoWhy make it complicated?lemmy.mlimagemessage-square122linkfedilinkarrow-up1369arrow-down138file-textcross-posted to: programmerhumor@lemmy.ml
arrow-up1331arrow-down1imageWhy make it complicated?lemmy.mlHiddenLayer555@lemmy.ml to Programmer Humor@programming.devEnglish · edit-22 months agomessage-square122linkfedilinkfile-textcross-posted to: programmerhumor@lemmy.ml
minus-squareVictor@lemmy.worldlinkfedilinkarrow-up3·2 months agoI meant that it should probably be: String a = new String()
minus-squareBehindTheBarrier@programming.devlinkfedilinkarrow-up2·2 months ago"".to_string() probably
minus-squarenintendiator@feddit.cllinkfedilinkEnglisharrow-up1·14 days agoI am not married to any particular language’s syntax choices but sure if we want to play “make it feel like C++”: std::cpp26::string a : std::cpp26::make_unique( std::cpp26::string{} ); I could try and pass it through a number of iostreams or a to_array conversion to see if I can push a to_string() in somewhere…
String a: new String()
=
?""
most likelyI meant that it should probably be:
String a = new String()
"".to_string()
probablyI am not married to any particular language’s syntax choices but sure if we want to play “make it feel like C++”:
I could try and pass it through a number of iostreams or a to_array conversion to see if I can push a
to_string()
in somewhere…