[ / / / / / / / / / / / / / ] [ dir / bestemma / doomer / faggotry / vichan / vietnam / voros / wmafsex ][Options][ watchlist ]

/tech/ - Technology

You can now write text to your AI-generated image at https://aiproto.com It is currently free to use for Proto members.
Email
Comment *
File
Select/drop/paste files here
Password (Randomized for file and post deletion; you may also set your own.)
* = required field[▶ Show post options & limits]
Confused? See the FAQ.
Expand all images

[–]

 No.979456>>979458 >>979611 >>979742 >>980402 >>980613 >>996148 >>996408 >>996701 [Watch Thread][Show All Posts]

What features would you remove from C++?

What would you add?

 No.979458>>979459

>>979456 (OP)

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


 No.979459>>979461 >>1001676

>>979458

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


 No.979461>>979463 >>979465 >>979477

>>979459

What about D?


 No.979463


 No.979465

>>979461

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


 No.979477

>>979461

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


 No.979489>>979495

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


 No.979495

>>979489

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


 No.979571

-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


 No.979581

> What features would you remove from C++?

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++.


 No.979611

>>979456 (OP)

everything that's not in C


 No.979612

and more


 No.979742

>>979456 (OP)

>What features would you remove from C++?

everything

>What would you add?

Rust


 No.979924

>What features would you remove from C++

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


 No.979972

I'd remove the extra plus.

And i'd make it C+ HolyC


 No.980390>>996158

_FORCE_INLINE_

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


 No.980402

>>979456 (OP)

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


 No.980600>>980602

> Remove

Classes and inheritance, references

> Add

Designated initializers

C with template metaprogramming and lambda is ideal!


 No.980602>>992970

>>980600

>C with template metaprogramming and lambda is idea

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


 No.980613>>980614 >>989952

>>979456 (OP)

Remove all of it.

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


 No.980614>>980616

>>980613

>Also remove the need of header files.

Another nodev.


 No.980616>>980620

>>980614

>headers are good

Incorrect opinion discarded.


 No.980620>>980622

>>980616

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


 No.980622>>980632

>>980620

>They sure as fuck are good

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.


 No.980632>>980635 >>980640 >>980646

>>980622

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.


 No.980635>>980636

>>980632

>Otherwise you need the source for fucking everything

Nodev detected


 No.980636>>980639

>>980635

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.


 No.980639>>980641

>>980636

Keep crying nodev.


 No.980640

File (hide): f761122082d293a⋯.png (623.5 KB, 733x723, 733:723, 763762763878378432.png) (h) (u)

>>980632

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.


 No.980641

File (hide): a9f1017418bcefc⋯.jpg (89.47 KB, 960x960, 1:1, DaiRC9cUQAAYkvm.jpg) (h) (u)


 No.980646>>980647 >>980677

>>980632

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.


 No.980647>>980652

>>980646

>who cares how binaries work since you don't actually interact with them beyond including the file

You mean the header file.

>But I don't want to keep managing the fucking headers for all of my own shit while I'm programming.

Then auto generate them faggot.


 No.980652>>980654

>>980647

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.980654>>980657

>>980652

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


 No.980657>>980662

>>980654

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.


 No.980662>>980667

>>980657

>My tiny shit program is representative of 99% of real world cases involving a metric fuck ton of libraries spread across the system and various package managers.


 No.980667>>980670 >>980671

>>980662

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.


 No.980670>>980674

>>980667

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


 No.980671>>980674

>>980667

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


 No.980674>>980676

>>980670

That's enough strawmanning don't you think.

>>980671

What has graphics got to do with headers?


 No.980676>>980677

>>980674

>What has graphics got to do with headers?

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


 No.980677>>980678

>>980676

By reading this post >>980646


 No.980678>>980680

>>980677

>Code written by any human but me does not matter

okay bud


 No.980680>>980681

>>980678

>I have no reading comprehension


 No.980681>>980685

>>980680

>But I don't want to keep managing the fucking headers for all of my own shit while I'm programming.

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


 No.980685>>980687 >>1000093

>>980681

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.


 No.980687>>980688

>>980685

> I don't want to generate anything for it, I just want to include that file.

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


 No.980688>>980692

>>980687

>back to strawmanning

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


 No.980692>>980697

>>980688

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


 No.980697>>980698

>>980692

t. wrote his first hello world last month


 No.980698>>980702


 No.980702

>>980698

Epic meme fellow channer


 No.980852>>996033

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.


 No.989952

>>980613

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


 No.989959

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.


 No.989968>>992974 >>996027

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++.


 No.992970>>997400

>>980602

C++ doesn't have designated initializers.


 No.992974

>>989968

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.


 No.996026>>996032 >>996036

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).


 No.996027

>>989968

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.


 No.996032

>>996026

One language other than maybe APL that has unique symbols.

>libraries

What is STL?


 No.996033

>>980852

>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.


 No.996036>>996063

>>996026

>larger standard library

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.


 No.996063

>C++ standard library is bloated as fuck

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.

>>996036

>if you want a library then use a library

Did you even read this before you posted it?

>stop jamming every imaginable fucking thing into the fucking STL

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.

>If people like you were in charge we'd have unreal engine in the STL

I don't think you understand what the STL is

>and the compiler would be 70 gigabytes

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?


 No.996148>>996212

>>979456 (OP)

>What features would you remove from C++?

C strings. Null termination was a mistake

>What would you add?

Isn't it bloated enough already?


 No.996158

>>980390

>he fell for the portable assembler meme

you never had your assembler. you never had your registers


 No.996212>>996221

>>996148

>C strings

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


 No.996221>>996222

>>996212

read the fucking post, retard


 No.996222>>996224

>>996221

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


 No.996224>>996228

>>996222

>not using cstring compatible text means removing \0 from the ascii support


 No.996228>>996229 >>996230

>>996224

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


 No.996229>>996256

>>996228

>ASCII means null terminated strings

yeah sorry faggot that is not how it works


 No.996230>>996238

>>996228

https://en.wikipedia.org/wiki/Null-terminated_string#Character_encodings

>Null-terminated strings require that the encoding does not use a zero byte (0x00) anywhere, therefore it is not possible to store every possible ASCII or UTF-8 string

Null termination literally fucks up ASCII


 No.996238>>996239

>>996230

>C designer Dennis Ritchie chose to follow the convention of NUL-termination, already established in BCPL, to avoid the limitation on the length of a string and because maintaining the count seemed, in his experience, less convenient than using a terminator.[1]

>already established in BCPL

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


 No.996239>>996248

>>996238

>use a control code for control signalling

>bonehead idiocy

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


 No.996248

>>996239

> 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.


 No.996256>>996259 >>996261

>>996229

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


 No.996259>>996277

>>996256

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


 No.996261>>996282

>>996256

>Also, why do you keep using the word "string" when we are referring to char arrays?

<C strings. Null termination was a mistake

Literally the first reference to it: https://en.wikipedia.org/wiki/C_string_handling


 No.996277>>996283 >>996285 >>996462

>>996259

>They can put NULL wherever the fuck they want.

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.

>NULL termination as a method for handling strings is not the same thing

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.


 No.996282>>996283

>>996261

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.


 No.996283>>996289

>>996277

>>996282

>getting rid of cstrings as a part of the language means banning every way the memory layout could ever be created.

What kind of fucking retard are you.


 No.996285

>>996277

>C++ does not give a single shit about null terminated character arrays.

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.


 No.996289>>996294

>>996283

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.


 No.996294>>996297

>>996289

>getting rid of cstrings as a part of the language means banning every way the memory layout could ever be created.


 No.996297>>996298 >>996462

>>996294

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


 No.996298

>>996297

>Answer the question

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.


 No.996385>>997188 >>997400

>NULL

>NUL

hmmmmmmmmmmm who knew brainlets used C++


 No.996408

>>979456 (OP)

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.


 No.996414

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


 No.996462

>>996297

>>996277

Fucking hell anon, how slow are you?


 No.996701

>>979456 (OP)

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


 No.997188

>>996385

NUL is the ASCII character control code definition for character 0

NULL is a C convention.

Glad to have cleared that up for you.


 No.997379>>1000110

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


 No.997400

>>992970

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

>>996385

nullptr :^)


 No.1000093

>>980685

>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.

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.


 No.1000110

>>997379

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


 No.1001668

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


 No.1001676

>>979459

>C99 + Classes

Fuck that. C99 + generics.


 No.1009309

What features does C++ remove? STUPID PROGRAMMERS !!!! HAHAHA !!! (Learn to program and then talk!

   ;)




[Return][Go to top][Catalog][Screencap][Nerve Center][Cancer][Update] ( Scroll to new posts) ( Auto) 5
100 replies | 3 images | Page ???
[Post a Reply]
[ / / / / / / / / / / / / / ] [ dir / bestemma / doomer / faggotry / vichan / vietnam / voros / wmafsex ][ watchlist ]