What features would you remove from C++?

What features would you remove from C++?
What would you add?

Attached: 898033433d1ee251789d77249c302549eedb3b343659913b1c452178d8371780.jpeg (778x675, 51.79K)

Other urls found in this thread:

en.wikipedia.org/wiki/Null-terminated_string#Character_encodings
en.cppreference.com/w/cpp/language/aggregate_initialization
twitter.com/NSFWRedditImage

It would unironically be easier to make a new language than try to fix Pajeet++.

Yeah. C99 + Classes would be perfect(basically C++99 or Orthodox C++, called sometimes C+)

What about D?

no.

Isn't it basically C + Python (+ some retardation)?

on paper, D seems like the perfect version of C++

I'd write D without the ability to disable GC (if you need to disable GC you shouldn't be using D).

And if you need GC then you shouldn't try to fix C++.

-Images embedded in source code
-Rename void to U0
-If a line contains nothing but a string literal, send it to std output
-Be able to use any function as the entry point
-Have a space alien

Most of the programmers.

There is WAY too much software written in C++ that had no business being built in C++. Then there's all the legacy shitpiles of pre-C++11 with all their Cthulhu-summoning template voodoo from too-clever-by-half brainlets. The best damn thing game developers figured out is LUA just to remove whole reams of shitty code so we can actually focus on the performance. I'd rather write that interop code for Brainfuck than one more line of business/gameplay code in C++.

everything that's not in C

and more

everything
Rust

Fucking Undefined behavior. Fuck this shit, this is the apex of "I'm not a good programmer, I make shitty language with shitty bugs and call them a "feature""

I used to like c++ before I started to work with it

I'd remove the extra plus.
And i'd make it C+ HolyC

_FORCE_INLINE_
At no point should the compiler ever have freedom to decide whether or not it will do what I tell it to.

ITT: Nodevs who don't know shit except how to run make complain by spouting memes they heard on cuckchan.

Classes and inheritance, references

Designated initializers

C with template metaprogramming and lambda is ideal!

Good thing you can just write c++ that way.

Remove all of it.

Add pseudo-method syntax, better automatic type casting, and namespacing functionality to C. Also remove the need of header files.

Another nodev.

Incorrect opinion discarded.

They sure as fuck are good. Go back to cuckchan you larper. We don't need more browser threads here.

Do tell us why they're good other than they make you feel like an epic hacker because you're doing extra work for no benefit.

They are an API specification for binaries. You need that shit to work with anything. Otherwise you need the source for fucking everything all the time to use it.

Nodev detected

You really have no idea how linking works. You need a header, some shitty equivalent to a header, or the raw source. Fuck off retard.

Keep crying nodev.

This, headers are fucking great. It's documentation that cannot be wrong, barring the comments. It is so much easier browsing C/C++ source with nice headers than some headerless lang with implementation mixed in everywhere. Yes, some editors provide function collapse or class overview, but header works everywhere, from nano to VS.

What sucks is includes. If it's violated in some places anyway then just remove all single-pass shit.

Attached: 763762763878378432.png (733x723, 623.5K)

Attached: DaiRC9cUQAAYkvm.jpg (960x960, 89.47K)

I'm talking about headers to your own files, who cares how binaries work since you don't actually interact with them beyond including the file. But I don't want to keep managing the fucking headers for all of my own shit while I'm programming.

You mean the header file.
Then auto generate them faggot.

Right, now we're veering towards the direction of "REEEE C IS PERFECT IF YOU DON'T SOMETHING ABOUT IT THEN MAKE YOUR OWN LANGUAGE".

No I fucking hate C. But header files have to stay. This is a problem literally every language has.

Then why are you telling me to use some kind of auto header generator when the language could just read from source? There's no reason.

...

I don't think I'll ever make something bigger than Jonathan Blow's current 3D puzzle game, which afaik compiles in about 2 seconds in Jai, a c/c++-level language that doesn't use headers.

Well then user i'm glad your tiny irrelevant meme project that could be written in brainfuck is enough for you.

If it has literally any graphics it's using headers.

That's enough strawmanning don't you think.


What has graphics got to do with headers?

Well user how the fuck does it talk to OpenGL, SDL, DirectX, Vulkan, Xorg, or whatever the hell it uses.

By reading this post

okay bud

...

You really can't follow the single point of logic required to understand the implications of this.

I really don't understand what you don't understand. If I include another file from my source, I don't want to generate anything for it, I just want to include that file. And I don't want to pre-define functions or structures either. If I include a binary library then I don't care what I'm including because I'm not going to interact with said 'what' beyond including it.

And that will work just fine for the trivial amount of code you will write

You could just stop posting if you want to quit the conversation.

It's really hard to communicate about real technical topics when the other person is a gamedev wannabe larper.

t. wrote his first hello world last month

Attached: joe-gato-gallery-impractical-jokers-tru-tv-325.jpg (325x400, 59.01K)

Epic meme fellow channer

I would start with C, add constexpr, templates, classes, placement-new, redo std::allocator to have allocator objects instead of using the allocator as a template parameter, and generally the standard library needs a lot of help to be useful. I'd also add case-classes and pattern matching, they're a common pattern and could be a library feature even. Manual memory management is fine, and with a changed allocator, it's pretty easy to implement GC if you want it, or statically scheduled region recycling if you want to be fancy.

headers are going to be old news in a few years. C++20 has modules, confirmed.

I'd say take C, add pass-by-reference, add namespaces, and rather than add classes, just make structs work like the C++ ones, including the visibility scope. The rest can simply be done in plain C. Templates as they exist in C++ have no place in C, due to being about as legible and elegant as brainfuck combined with advanced perl code.

Template metaprogramming. If you can't express what you were trying to do with standard language features and the occasional macro, you probably shouldn't be using C++.

C++ doesn't have designated initializers.

Ah yes the features used everywhere in the standard library have no place in the language. You retards do realize templates are how you get generics right? Without it everything has to be void* with manual casting every fucking time you use anything, or a copy pasted shitty implementation where you change the type manually.

The only things I would like to see change in C++ are as follows:
consistent syntax - I don't like seeing the same symbol being used to represent multiple things as we see with * and &.
automatic alignment - It's silly that I have to declare my struct/class members in a particular order to reduce memory consumption. at the very least, there should be a compiler flag to do this automatically.
larger standard library - I want to see high level libraries built on top of core C++ so it can be used similarly to C#/Java (and I want it to be part of the standard libraries).

Yes. I too, prefer to see people writing programs in C to output dynamically generated source files to be used to compile a larger project. That is way easier to maintain and understand than temlates.

One language other than maybe APL that has unique symbols.
What is STL?

STL isn't even close to what I'm asking for. It's only provides a tiny fraction of the total functionality that is expected from a standard library these days. C++ only gets away with it because it's relatively old.

People like you are why C++ is so shit. C++ standard library is bloated as fuck, if you want a library then use a library, stop jamming every imaginable fucking thing into the fucking STL. If people like you were in charge we'd have unreal engine in the STL and the compiler would be 70 gigabytes.

It's actually relatively minimal. Also, why don't you cry harder? Use plain C if you only want a sugar-coated version of ASM.


Did you even read this before you posted it?

Most of what I want has nothing to do with templates. I'm not sure why you think the STL specifically has anything to do with this. Either way, you are free to choose not to use the classes and methods that you do not use.

I don't think you understand what the STL is

Adding something to standard libraries does not require changes to the compiler. New language features do. I've only suggested 2 feature changes and neither of them would significantly increase the size of the compiler. Why are you trying to even pretend like you know what you are talking about?

C strings. Null termination was a mistake
Isn't it bloated enough already?

you never had your assembler. you never had your registers

What the fuck are you talking about, retard? You want to remove arrays or you want to remove characters?

read the fucking post, retard

Right, so you think the '\0' character which is part of the ASCII standard should be removed from C++?

...

So you don't think the ASCII standard should change. You just think C++ should intentionally break their implementation of the ASCII standard. Brilliant.

yeah sorry faggot that is not how it works

en.wikipedia.org/wiki/Null-terminated_string#Character_encodings
Null termination literally fucks up ASCII

I've seen bonehead idiocy on the net before, but this tops it all -- this takes the cut-glass flyswatter.

What do you think the nul byte should mean instead? Next you'll complain that they used the % char to do formatting.

Yeah that is fucking retarded, you should not mix all this random encoding shit you know how many errors this causes.

Literally the first character defined in the ASCII standard is NUL. Are you retarded? Also, why do you keep using the word "string" when we are referring to char arrays? There are exactly 3 ways you can prevent people from creating a null terminated char array.

1. Remove arrays from the language
2. Remove char from the language
3. Break support for the ASCII standard

They can put NULL wherever the fuck they want. NULL termination as the method for handling strings is not the same thing.

...

That's my point, retard. You can't stop people from creating NULL terminated character arrays unless you modify the language in absolutely retarded ways.

Completely irrelevant. As I have stated multiple times now, the only way to stop people from using null terminated character arrays is to do modify the language by either removing characters, removing arrays, or removing null characters (and breaking support for ASCII in the process). C++ does not give a single shit about null terminated character arrays. What the fuck do you think needs to change about C++ in regards to null terminated character arrays? C++ uses a special data structure called "string" you fucking degenerate.

Are you just pretending to be retarded? I honestly can't tell. In this conversation, it has been suggested that C++ would be made better by removing "C strings". "C strings" are just null terminated character arrays. You cannot remove null terminated character arrays from the language as all of the components (char, arrays, and NULL) are fundamental to the language.

What kind of fucking retard are you.

It sure as fuck does. When you type "hello world!" what the fuck do you think that is. I will tell you. It is a c style string instead of the many other representations it could have.

Okay please explain to me how you will stop people from creating and working with null terminated character arrays while also keeping arrays, characters, and NULL in the language. I'm sure this should be easy since you understand so well what you are talking about.

...

It literally does. Prove me wrong. Answer the question instead of green texting like a retard.

There is no question you are just an ignorant faggot. The point is not to ban BYTE BYTE BYTE NULL from ever existing anywhere in memory ever. You would have to be an absolute retard to think that. The point is for the language to not have cstrings in any part of the definition. For example if someone says "remove SHA256 from the language" (not that it is built in) that sure as fuck does not mean remove any way SHA256 could ever be constructed with anything that exists.

hmmmmmmmmmmm who knew brainlets used C++

Honestly, c++ is quite bloated but there isn't anything I would remove. I don't suggest using everything that c++ offers because that could lead to confusion on a large team.

we need a MinWin of C++ released out in the open

Fucking hell user, how slow are you?

I'd make the syntax identical to C# because C/C++ one is absolute shit.

NUL is the ASCII character control code definition for character 0
NULL is a C convention.

Glad to have cleared that up for you.

This kind of putting down other programmers would not happen if this was a Python thread.

C++20 does, though it has some limitations compared to C: en.cppreference.com/w/cpp/language/aggregate_initialization


nullptr :^)

What. You include something because you use declarations/definitions from "said 'what'". Also, how do you want to include something that is a binary library without a header? Do you want your binaries to include language-level type information? You might as well go to java then.

Python is annoying because it's still retard limited but slow as fuck. I wish Ruby were less gay honestly.

Nothing. C++ is literally the perfect language. Don't even bother debating me, because you are wrong.

Fuck that. C99 + generics.