← Home ← Back to /g/

Thread 105639909

70 posts 18 images /g/
Anonymous No.105639909 [Report] >>105639956 >>105639965 >>105640159 >>105641287 >>105641481 >>105641955 >>105643187 >>105643270 >>105643850 >>105643881 >>105647968 >>105648095
>my favorite keyword in C++ is "auto"
What type of person do you imagine?
Anonymous No.105639938 [Report] >>105640003 >>105641292 >>105645492
>int main
ngmi
auto main() -> int {}
Anonymous No.105639943 [Report]
i dont use goyplusplus
Anonymous No.105639956 [Report] >>105640114 >>105640132
>>105639909 (OP)
I can see the value when it comes to strange pointer return types, like nested pointers and function pointers
Anonymous No.105639965 [Report] >>105641299 >>105649208
>>105639909 (OP)
people laugh at JS, but C++ is just as comically bad
Anonymous No.105639971 [Report] >>105639999 >>105643843
I try not to imagine people.
Anonymous No.105639999 [Report] >>105640002 >>105641126 >>105641464
>>105639971
Not even when you're fapping?
Anonymous No.105640002 [Report]
>>105639999
Okay but not C++ programmers. Yet.
Anonymous No.105640003 [Report]
>>105639938
Yuck!
Anonymous No.105640114 [Report] >>105640132 >>105641269 >>105641280
>>105639956
i only use it for the autistic iterator return types from the stdlib.
Anonymous No.105640132 [Report] >>105641310
>>105640114
>>105639956
There are lambda types that aren't nameable.
Anonymous No.105640159 [Report]
>>105639909 (OP)
>What type of person do you imagine?
i imagine someone that looks like sam bankman huffing and puffing, mouth breathing, sweaty and smells bad.
Anonymous No.105641099 [Report] >>105642220
in Rust this is just "let"
Anonymous No.105641126 [Report] >>105648077
>>105639999
linoleum tiles are the best for that
Anonymous No.105641269 [Report] >>105641279
>>105640114
>she's still using iterators
Anonymous No.105641279 [Report] >>105641311
>>105641269
what are you supposed to use?
Anonymous No.105641280 [Report]
>>105640114
Oh yeah, this.
Anonymous No.105641287 [Report]
>>105639909 (OP)
the same kind of retard who uses functors as his default way of declaring functions.
Anonymous No.105641292 [Report]
>>105639938
extremely based. fpbp.
Anonymous No.105641299 [Report]
>>105639965
Javascript's ducktyping and weird implicit casting rules are way worse than C++. They're both bad though, yeah.
Anonymous No.105641310 [Report] >>105641349 >>105647182
>>105640132
they can be stored in a std::function though
Anonymous No.105641311 [Report] >>105641894
>>105641279
ranges is a good start
what it gods name do you even NEED iterators for?
Anonymous No.105641349 [Report]
>>105641310
Yeah, but the type is still unnameable. You either have to use template or auto.
Anonymous No.105641358 [Report]
Gay retard javascript+python pajeet
Anonymous No.105641464 [Report]
>>105639999
What do you think all the monitors are for?
Checked.
Anonymous No.105641481 [Report]
>>105639909 (OP)
>What type of person do you imagine?
carbrain
Babyduck No.105641894 [Report] >>105641999 >>105642661 >>105644183 >>105646180 >>105646498 >>105649170
>>105641311
It still looks bad compared withresult = vec & filter even & map ("2) & take 3
Anonymous No.105641955 [Report] >>105642615 >>105642787
>>105639909 (OP)
Auto means a different thing for C (not in C23), but if those retards at the committee purposely change a keyword's semantic then why we still using _Atomic instead of "atomic"?
Anonymous No.105641999 [Report] >>105642154
>>105641894
its not perfect, but still a massive improvement to iterators or god forbid "classic" C++
the shift towards more functional programming in C++ is highly erotic and retards lagging behind not using it will be obsolete
99% of what rust sells itself to be is already available in modern C++, you cannot convince me otherwise
Anonymous No.105642154 [Report]
>>105641999
>99% of what rust sells itself to be is already available in modern C++
lol
Anonymous No.105642220 [Report] >>105642231
>>105641099
Rust should allow type omission in the function signature like C++ does, especially for the return type.
Anonymous No.105642231 [Report]
>>105642220
that sounds awful
Anonymous No.105642513 [Report]
>java(script) is... le bad!
>anyway here's c++69420 it's basically indistuinguishable from java(script) - and that's a good thing!
Anonymous No.105642615 [Report] >>105643069 >>105648316
>>105641955
> change keyword meaning
They re-used auto because they didn’t know how to change the yacc or lex files.
But yeah, pretty embarrassing.
Also, auto itself is ass, you don’t know what type the fucking variable is half the time, like when you come back to the code. Other languages have the same problem, like Go.
Some of the more complex types I *never* knew the actual type, no idea what methods or public variables were.
Someone should make a ‘style’ ‘tidy’ or ‘fmt’ for C++ that replaces all the autos with their actual type.
Anonymous No.105642661 [Report] >>105642739
>>105641894
> vector
Bwahahahaa..
You’re supposed to be using “generators” now!

Our services staff rewrote all their python (the only thing they’re allowed to touch) to use generators and made the code 10 times bigger.
Anonymous No.105642739 [Report]
>>105642661
>Our services staff rewrote all their python (the only thing they’re allowed to touch) to use generators
....huh? what does this have to do with C++?
Anonymous No.105642787 [Report] >>105643093 >>105647938
>>105641955
You can't add new keywords willy-nilly as it will break existing code. In the case of auto, you already had a useless keyword right there to reuse.
Anonymous No.105643069 [Report]
>>105642615
Clangd can tell you the types.
Anonymous No.105643093 [Report] >>105643156 >>105646444
>>105642787
Backwards compatibility sucks and at some point they will need to break the language, and it's ok.
Anonymous No.105643156 [Report] >>105643537
>>105643093
Stealing basic words to replace with keywords is really disruptive. What if that word is the field name of widely used structure. The amount of code needing to be updated would be immense.
Anonymous No.105643187 [Report]
>>105639909 (OP)
C++ and Haskell are strangely enough very similar: they both came from an academic background where their designers were too busy adding new features to think whether it was a good choice for the language.
Anonymous No.105643270 [Report] >>105645504 >>105649195
>>105639909 (OP)
#define var auto
#define let const auto
Anonymous No.105643537 [Report] >>105643572
>>105643156
Who cares? the operator precedence order was never fixed and now you have much more code and year after year you will have more C code out there, not addressing these issues will cause a mayor pain in the future.
Anonymous No.105643572 [Report]
>>105643537
The C philosophy is don't fix anything and then say you can't fix it once at least one line of code depends on it. B was only used by the 2 people who made it and they were already complaining about not being able to fix strings or arrays in C because of "backwards compatibility."
Anonymous No.105643843 [Report]
>>105639971
Living life in peace?
Anonymous No.105643850 [Report]
>>105639909 (OP)
I use auto for function parameters too
Anonymous No.105643881 [Report]
>>105639909 (OP)
Myself. The only things I like more than auto are auto&& and constexpr auto.
Anonymous No.105644183 [Report] >>105645412
>>105641894
last time I checked ranges add 3-5s to compilation you are better off using a third party library. In fact anything past c++17 adds ~4s
sage No.105645412 [Report] >>105649116
>>105644183
oh no 3-5s compilation time per unit that uses ranges
pro tip; if youre using ranges in every of your units you're probably doing something very very wrong
Anonymous No.105645492 [Report]
>>105639938
make it stop
Anonymous No.105645504 [Report]
>>105643270
Based.
Anonymous No.105646180 [Report]
>>105641894
>DUDE FUNCTIONAL PROGRAMMING
is this 2015
Anonymous No.105646190 [Report] >>105646453 >>105647045
>std::
>std::
>std::
>std::
>std::
>std::
>std::
Anonymous No.105646398 [Report]
itt bad programmers whine about trivialities
Anonymous No.105646444 [Report]
>>105643093
Sutter is already on it.
Anonymous No.105646453 [Report] >>105647071
>>105646190
using namespace std;
problem solved
Anonymous No.105646498 [Report] >>105647230
>>105641894
Is there even a point in learning c++. 10 years ago i thought I had a good grasp of the stdl but every time c++ is brought up there is a new feature I had no clue existed
Anonymous No.105647045 [Report]
>>105646190
this is even uglies than rust
Anonymous No.105647071 [Report]
>>105646453
namespaces are gay my dude
Anonymous No.105647182 [Report]
>>105641310
And how do you think std::function is implemented? Do you think retarded template type deduction is more ergonomic than auto?
Anonymous No.105647230 [Report]
>>105646498
I honestly do not see the point unless you need it for work. The language seems intent on torturing itself into insanity and complete illegibility. Learn a language that is actually fun to write in while waiting for AI to replace handwritten code entirely.
Anonymous No.105647938 [Report]
>>105642787
c++ has some contextual keywords known as soft keywords elsewhere. auto auto could have been.
Anonymous No.105647968 [Report]
>>105639909 (OP)
I don’t assume at first. I wait and see how others expect him to act and determine his type that way.
Anonymous No.105648077 [Report]
>>105641126
Kek
Somebody share the image please.
Anonymous No.105648095 [Report]
>>105639909 (OP)
A professional C++ programmer. Usually they are quite intelligent, but it's a broad category.
Anonymous No.105648316 [Report]
>>105642615
You don't need to know the name of a type. It gives you no actionable information by itself.
Anonymous No.105649116 [Report]
>>105645412
its not per unit. Its the c++20 flag thats the problem because of ranges the headers all doubled or tripled which adds more time. Like I said its all feature flags beyond c++14 that add a couple seconds which makes using the std lib painful.
Anonymous No.105649170 [Report]
>>105641894
With operator overload and C++20 concepts you can have all that syntax candy you want and in the way you believe is better. Very handy for advent of code and personal projects.
Anonymous No.105649195 [Report]
>>105643270
Nice, but there is a template meta programming scenario where you need to write auto const because const auto doesn't work.
Anonymous No.105649208 [Report]
>>105639965
Skill issue, JS and C++ are the best languages.