Why does Any Forums dislike C++ ?
Why does Any Forums dislike C++ ?
I don't.
I don't.
bloat
it's unreadable and unwieldy. otherwise it's pretty cool. the OOPsy shit is disgusting but it's a product of the times and I don't think that it defines the language the way that it does for Java.
Nakadashi clown girl
NEET losers.
Cuz it's a feature creep octopus with ugly syntax.
i don't. a good litmus test to see who's a poser is to see how much they seethe at c++ existing.
also, call it c/c++ and watch people spaz out, very effective tactic. it's like saying java/javascript.
the syntax is perfect - only a true brainlet would complain about it.
>turing complete type system
it is the only type system that has the potential to be your ai waifu.
What bloat? The features that you don't use won't effect your program.
it's my favorite language.
although cmake is unironically going to kill the entire ecosystem.
I fuckin swear to God, all these faggots trying to add npm tier packaging tools need to fuckin die.
I fuckin love C++.
But I experienced something the other day while doing a leetcode that made me seethe...
std::vector vecA(3);
std::vector vecB{3};
// turns out those actually have completely different behaviour
// because std vector has a defined constructor taking an initializer list
C++ initialization is a fuckin mess... But I still love it.
CMake is fucking based since version 3.15 and you can't convince me otherwise.
If you had a bad experience with it Im sorry you got filtered.
I like qmake better and am a little disappointed qbs never became a thing.
cmake itself is okay. it is absolutely mediocre in all ways, but manages to work well enough everywhere. the problem isn't cmake itself, it's retard windows developers that can't make a coherent file system or build scheme that cause all the pain.
also, how do you make cmake generate a full SOName for Linux? I can only convince it to build libblah.so.0, not the full name (either .0 or .0.0, it's been a few months since I tried)
c/c++ it's only used in vidya games.
C++ it's the only programming langage that you can't skip a single chapter even if it's boring because you could miss something that will mess up the entire course.
Im not sure exactly what you mean by "full so name" but you could try changing the suffix manually if thats what you're looking for
add_library(Foo SHARED)
set(foo_version 1.3.5)
if (NOT WIN32)
set_target_properties(Foo
PROPERTIES
SUFFIX ".so.${foo_version}"
)
endif()
My apologies if this isnt what you meant.
What wouldn't you nakadashi, user?
an soname is a description of the library version to link against at load time that gets embedded into a linking binary at build and link time. it's purpose is to allow multiple versions of the same library to exist in the system at once without conflicting.
anyway there's a way to set it in cmake to use the project version, that also works for windows somewhat, but it doesn't include all 3 parts of the version for some reason
Right, but AFAIK that gets set with the SOVERSION property.
Are setting that property?
Here's a full example of how I define my libs... the automatic install behaviour from this has been fine for me!
project(Example LANGUAGES CXX VERSION 1.0.0)
# - - define library target
add_library(Foo)
add_target_sources(Foo
PUBLIC
header.h
PRIVATE
source.cpp
)
# set library version
set(FOO_VERSION_MAJOR 1)
set(FOO_VERSION_MINOR 2)
set(FOO_VERSION_PATCH 3)
set(FOO_VERSION "${FOO_VERSION_MAJOR}.${FOO_VERSION_MINOR}.${FOO_VERSION_PATCH}")
set_target_properties(Foo
PROPERTIES
VERSION "${FOO_VERSION}"
SOVERSION "${FOO_VERSION_MAJOR}.${FOO_VERSION_MINOR}"
)
# - - set target include dirs, etc
...
# - - install rules
...
Like pretty much every other language in the last 50 years it tried to be a better C and failed.
probably because Any Forums is full of 17 year old kids. I used to be the same way. Ew too complicated just use php and java!