▲ 333 ▼ Why make it complicated? (lemmy.ml) submitted 1 year ago* by HiddenLayer555@lemmy.ml to c/programmer_humor@programming.dev 123 comments fedilink hide all child comments Made with KolourPaint and screenshots from Kate (with the GitHub theme).
[–] isVeryLoud@lemmy.ca 2 points 1 year ago (3 children) "" most likely permalink fedilink source parent hideshow 3 child comments replies: [–] victorz@lemmy.world 3 points 1 year ago I meant that it should probably be: String a = new String() permalink fedilink source parent [–] BehindTheBarrier@programming.dev 2 points 1 year ago (1 child) "".to_string() probably permalink fedilink source parent hideshow 1 child comment replies: [–] nintendiator@feddit.cl 1 point 1 year ago I 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... permalink fedilink source parent
[–] victorz@lemmy.world 3 points 1 year ago I meant that it should probably be: String a = new String() permalink fedilink source parent
[–] BehindTheBarrier@programming.dev 2 points 1 year ago (1 child) "".to_string() probably permalink fedilink source parent hideshow 1 child comment replies: [–] nintendiator@feddit.cl 1 point 1 year ago I 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... permalink fedilink source parent
[–] nintendiator@feddit.cl 1 point 1 year ago I 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... permalink fedilink source parent