Today on exceptionally shit takes: "C++ is easier than Java"
Conversation
Notices
-
Embed this notice
Lars (luatic@mastodon.social)'s status on Saturday, 23-Nov-2024 12:01:20 JST Lars -
Embed this notice
pinskia (pinskia@hachyderm.io)'s status on Saturday, 23-Nov-2024 12:01:18 JST pinskia @luatic @lizzy With C++23 (if the std module exists; I think std module only made it into C++26 though), it is would be just `import std; int main() { std::print("Hello world!\n"); }`
-
Embed this notice
Lars (luatic@mastodon.social)'s status on Saturday, 23-Nov-2024 12:01:19 JST Lars @lizzy ☝️🤓 actually with Java 23+ you can now have "void main() { println("Hello world!"); }" which should be shorter than the C++ one (even if you skip the iostream verbosity and use C puts) since you don't need to include anything
-
Embed this notice
akkoma flavored lizzy (fleckenstein@lizzy.rs alt) (lizzy@social.vlhl.dev)'s status on Saturday, 23-Nov-2024 12:01:20 JST akkoma flavored lizzy (fleckenstein@lizzy.rs alt) @luatic it's true tho, the hello world is shorter 🧠 -
Embed this notice
pinskia (pinskia@hachyderm.io)'s status on Saturday, 23-Nov-2024 12:10:37 JST pinskia @luatic @lizzy "even if you skip the iostream verbosity and use C puts" What are you using? C++98 or something? std::print exists in C++23 so :).
-
Embed this notice
Lars (luatic@mastodon.social)'s status on Saturday, 23-Nov-2024 12:23:51 JST Lars ((but std::print is still longer than puts and you still need to include something for it, so..))
-
Embed this notice
pinskia (pinskia@hachyderm.io)'s status on Saturday, 23-Nov-2024 12:23:51 JST pinskia @luatic @lizzy `import std;` in C++26 :) and the plan IIRC is to include the std module for GCC 15.
-
Embed this notice