HiddenLayer555@lemmy.ml to Programmer Humor@programming.devEnglish · edit-21 month agoWhy make it complicated?lemmy.mlimagemessage-square123linkfedilinkarrow-up1370arrow-down138file-textcross-posted to: programmerhumor@lemmy.ml
arrow-up1332arrow-down1imageWhy make it complicated?lemmy.mlHiddenLayer555@lemmy.ml to Programmer Humor@programming.devEnglish · edit-21 month agomessage-square123linkfedilinkfile-textcross-posted to: programmerhumor@lemmy.ml
minus-squareVictor@lemmy.worldlinkfedilinkarrow-up3·1 month agoI meant that it should probably be: String a = new String()
minus-squarenintendiator@feddit.cllinkfedilinkEnglisharrow-up1·1 day 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…
=
?""
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…