Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-4041-

C++ is not back

Name: Anonymous 2012-12-02 11:40

http://simpleprogrammer.com/2012/12/01/why-c-is-not-back/

Some interesting points about C++. I think next version of C++ should remove 80% of the language.

And no, C is not an option. Lack of RAII and other "advanced" functionalities will result in terrible bugs.

And no, D is not proper replacement. GC is shit.

Name: Anonymous 2012-12-02 14:26

[quote]Email me
var emailAddress = new StringBuilder("john.sonmez"); emailAddress.Append("@gmail.com"); emailAddress.ToString();[/quote]
Stopped reading right there.

Name: Anonymous 2012-12-02 15:00

>>2
Please learn to quote, Reddit fa/g/shit.

Name: Anonymous 2012-12-02 15:41

I think next version of C++ should remove 80% of the language.
C++ will only expand.

And no, C is not an option.
Yes it is.

Lack of RAII and other "advanced" functionalities will result in terrible bugs.
r u avin a giggle ``m8''?

Name: Anonymous 2012-12-02 15:44

(javascript is superior OOP)> ᕦ(ò_óˇ)ᕤ

Name: Anonymous 2012-12-02 16:25

>>4
Yes it is.
Hah, C is only good for kernel development.

Name: Anonymous 2012-12-02 16:27

>>6
Why do you say that C is only good for kernel development?

Name: Anonymous 2012-12-02 16:28

>>7
What is kernal?

Name: Anonymous 2012-12-02 16:28

>>7
Because he/she is shit as fuck.

Name: Anonymous 2012-12-02 16:34

>>9
Why do you think that he/she is shit as fuck?

Name: Anonymous 2012-12-02 16:35

>>9
Is it because he/she is shit as fuck that you post here?

Name: Anonymous 2012-12-02 18:37

>>2
Mairu me
hayaku kudasai watachi
itsumo matteru

Name: Anonymous 2012-12-03 0:18

>>7
Because C++ is better for anything else.

Actually, C++ is better even for kernel development.

Name: Anonymous 2012-12-03 0:37

>>13
Actually, C++ is better even for kernel development.
Which is why there are so many well known, production quality kernels written in C++...

Name: Anonymous 2012-12-03 0:41

>>14
C++ code is faster than equivalent C.

Name: Anonymous 2012-12-03 2:12

>>15
That doesn't make any sense since c++ is a super set of c, and every feature provided in c++ can be expressed in c, in a variety of ways. c++ can only implement its features in only so many ways, and it must do it in a way that can also be done in c.

Name: Anonymous 2012-12-03 2:18

>>12

>Mairu me

you mean mail me or marry me?

Name: Anonymous 2012-12-03 3:43

>>16
Sorry, this isn't the 90s anymore.

Name: Anonymous 2012-12-03 4:05

>>18
That doesn't make any sense since both c++ and c have barely changed at all since the 90s. You see, programming languages are not like hardware, where people invent new methods to get better performing equipement subject to the restrictions of physics. Programming languages are subject to the restriction of human thought. This is why they cannot progress. It's because of people like you. I hope you are happy.

Name: Anonymous 2012-12-03 5:03

>>13
3/10, ``faggot''

Name: Anonymous 2012-12-03 5:16

I enjoy throwing objects whenever I am upset, that's why I enjoy C++ using exceptions

Name: Anonymous 2012-12-03 8:06

>>14
The Windows NT kernel is pretty popular...

The big objections to C++ are poor tools, the runtime requirements, and too complex language features. The first (and partly the second) stem from the mid-90s and have been largely solved by now. The second and third are usually handled by allowing only a subset of the language, but especially with the third you always get some self-titled expert timewaster who insist on using every feature even though they don't understand it themselves.

Name: Anonymous 2012-12-03 8:14

>>22
And all this nonsense is solved by simply not using C++!

Name: Anonymous 2012-12-03 8:16

>>22
Also, the Windows NT kernel is written in a shitty MICROSOFT QUALITY dialect of C, not C++.

Name: Anonymous 2012-12-03 8:24

>>22
It is popular and it is written in C

Name: Anonymous 2012-12-03 8:41

>>2
This.

Name: Anonymous 2012-12-03 21:37

>>22
(poor tools, partly the runtime requirements) have been largely solved by now
using only a subset of the language
RUBY AS FUCK tools, imprecise analyzers, undefined ABI

lel

Name: Anonymous 2012-12-03 22:44

C++ is definitely the best language for large, important software. Chances are you'll run into performance or ``scalability'' problems with shitlanguages like ``.NET Enterprise Beans''. 90% of programming, however, is not large and not important, so go ahead and use whatever you want.

Name: Anonymous 2012-12-03 22:50

>>28
No way,PUNK

Name: Anonymous 2012-12-03 22:53

since every soft which matters is written in c++.. your browser, your os, the game you installed on your hard drive etc etc >>28 is right

Name: Anonymous 2012-12-03 23:41

>>30
My browser is written in C, my OS is written in C, and the games I have installed are written in C, Java, Python, Scheme, assembly, and Inform.
Where is your Sepples now?

Name: Anonymous 2012-12-03 23:49

>>31
the games I have installed are written in C, Java, Python, Scheme, assembly

lol

Name: Anonymous 2012-12-03 23:51

>>31
Which OS, which browser, and which games?

Name: Anonymous 2012-12-04 0:25

>>33
Every OS. Even the NT kernel is written in C.
And I can't speak for >>31-kun, but I do most of my browsing with w3m.

Name: Anonymous 2012-12-04 0:42

>>33
Minix, w3m, Zork and several reimplementations of Pac-Man and Tetris.

Name: Anonymous 2012-12-04 0:55

>>35
>MINIX
>LE LLEEEEELLLLLLLLLLLLLLLLLLLLLLLLLLLL

Name: Anonymous 2012-12-04 0:58

>>34
the nt kernel is written in c++ and assembly dipshit. all of windows is written in c++.

Name: Anonymous 2012-12-04 2:41

kernel may be written in c but most part of every os is written in c++ anyway

Name: Anonymous 2012-12-04 2:43

w3m is cute but it doesn't support javascript -_-

Name: Anonymous 2012-12-04 2:53

>LE EJPIN JPRO
>LE KAWAI LE DESU
>MY TOUHOU FACE

Name: Anonymous 2012-12-04 4:13

>>37
Win32 is a C API, and the vast majority of the NT kernel is written in C [1].  You can indeed write kernel mode drivers for NT in C++ [2], but this is of limited usefulness because one must dispense with many of the defining features of the language (templates, exceptions, RTTI) in order to get things done. Even RAII is of limited application because kernel destructors can often fail in myriad ways.

I'm not at all convinced that it's worth it to switch from C to C++ for kernel code. For a green-field project, a C++ subset might be a smidge nicer to use, but real world codebases like the Linux kernel have already implemented so many of the niceties in plain C that there's no clear benefit to switching.


[1] http://discuss.fogcreek.com/joelonsoftware/default.asp?cmd=show&ixPost=28914
[2] http://msdn.microsoft.com/en-us/library/windows/hardware/gg487420.aspx

Name: Anonymous 2012-12-04 5:05

>>41
The API is C for MAXIMUM compatibility, it doesn't say anything about the implementation language. Templates, exception, RTTI either didn't exist yet or had only bad/expensive implementations (remember that this is late 80s/early 90s language and compilers).

Most kernels reinvent object orientation anyway (Linux VFS layer just to give a lel randum example), so why not save some work and use a language that supports the features from the start?

Name: Anonymous 2012-12-04 5:56

>>14
The Symbian kernel, written completely in C++, is pretty popular. Ot at least it used to be. That amounts to hundreds of millions C++ kernels shipped. That's 8 orders of magnituds more than GNU/Hurd or whatever you neckbeards endorse here.

Name: Anonymous 2012-12-04 5:56

>>41
I agree that there is not much point in rewriting current kernels in from C to C++.

However, I think that if starting to create new kernel from scratch, it would be very useful to use C++ instead of C. And I also think Linux should make it easier to develop drivers in C++, or maybe allow the use of C++ in certain parts of the kernel itself.

Name: Anonymous 2012-12-04 5:59

>>42
Because you truly gain nothing.

Name: Anonymous 2012-12-04 6:17

>>43
The Lisp machine kernel, written completely in lisp, is pretty popular. Ot at least it used to be. That amounts to hundreds of millions of lisp kernels shipped. That's 8 orders of magnitude more than Linux/Windows NT or whatever you neckbeards endorse here.

Name: Anonymous 2012-12-04 6:51

>>46
The Losethos kernel, written completely in AutismC, is pretty popular. Or at least it used to be. That amounts to hundrends of billions of AutismC kernels shipped. That's 8 orders of magnitude more than Linux/Windows NT/Symbian OS/Lisp OS or whatever you enterprise programmers endorse here.

Name: Anonymous 2012-12-04 7:27

>>45
Just not having to rely on macro garbage to make your fake objects palatable is an improvement.

Name: Anonymous 2012-12-04 7:55

The next version of C++ should remove 100% of the language.

Name: Anonymous 2012-12-04 7:55

>>47
You don't have any friends in your class.

Name: Anonymous 2012-12-04 8:04

And no, C is not an option. Lack of RAII and other "advanced" functionalities will result in terrible bugs.
Only if you're careless.

Name: Anonymous 2012-12-04 8:41

>>51
Yeah, only if I'm careless, or any of the developers that touch the code after me. Basically only if there is any careless developer in the company, or will be. So I can just use C, because every developer touching the code is perfect.

Name: Anonymous 2012-12-04 8:44

>>51
lel 99.9999% of the bugs in C applications are forgetting to free le resource after usage. and releasing resources in C can only work well if you have only 1 return clause per function.

Name: Anonymous 2012-12-04 9:17

>>53
But that's good policy anyway.

Name: Anonymous 2012-12-04 9:18

>>53
lel, le
stop that or people will start taking it seriously

Name: Anonymous 2012-12-04 9:49

C++ facilitates objection-oriented programming (OOP).

Name: Anonymous 2012-12-04 11:42

>>56
OOP doesn't solve any hard problems, learn to structure and discipline, it's easy. OOP wouldn't help anyway, if you believed that.

Name: Anonymous 2012-12-04 12:15

>>56
So does C.

Name: Anonymous 2012-12-04 12:23

>>57
Wow, a real-life retard

>>58
I do not object to using C where it belongs.

Name: Anonymous 2012-12-04 12:36

>>59
You're having hard problems that can only be solved by OOP?
Lel.

Name: Anonymous 2012-12-04 12:48

>>60
Troll harder!

Name: Anonymous 2012-12-04 13:06

C++ with OOP, what could go wrong?
handicapped polymorphism
undefined as shit C
implicit needles
trashing cache
hit a wall? rewrite in data-oriented C subset

RUBY AS FUCK

Name: Anonymous 2012-12-04 13:15

>>61
A thought-terminating cliché from you, but it's not related to me and my question. Infact it did not even imply your silly rebuttal. To me that was unexpected. There are problems where OOP is a suitable method and if you would have mentioned at least one of them I would be prepared to give alternative methods that are at least to me better since they do not imply the need of an entire programming language, an imperative language would do just fine. But I'm talking with my self since you have nothing else to add, so I'll stop because it is boring me or at least saddening me.

Name: Anonymous 2012-12-04 15:33

>>37
wrong, it is written is ANSI C

Name: Anonymous 2012-12-04 15:34

>>37
Wrong, it is written in ANSI C.

Name: Anonymous 2012-12-04 15:38

>>15
No, not really.

Name: Anonymous 2012-12-04 15:43

Alan Turing must be turning on his grave with the amount of gotos the windows NT kernel have

Name: Anonymous 2012-12-04 22:42

>>67
That joke only works with Dijkstra, don't know if I should be glad or sad no one picked it up.

Name: Anonymous 2012-12-05 1:20

The problem with saying deliberately stupid shit for attention is that eventually it becomes impossible to tell /prog/ apart from people who believe stupid shit.

Name: Anonymous 2012-12-05 1:23

>>68 what else would you expect from /g/
>>69 maybe /prog/ isn't that bad after all. We are just pretending to be terrible to constantly troll ourselves.

Name: Anonymous 2012-12-05 22:39

>>54
Good policy, made incredibly annoying by the prescriptions against goto that frequently accompany it.  Sanity demands one or the other, but not both.  It does not help readability at all to use extra flag variables to direct transfers of control.

There is nothing wrong with this:

int func1(int *f, int x)
{
    char *buf;
    int err;
    int ret;
   
    ret = 0;
   
    buf = malloc(4096);
    if (!buf) {
        ret = -1;
        goto out1;
    }
   
    err = func2(buf, x);
    if (err) {
        ret = -1;
        goto out2;
    }
   
    /* Et cetera... */

    *x = func4(buf);
out2:
    free(buf);
out1:
    return ret;
}


The alternative requires creating a new function or nested control structure every time an error code is checked.  You can't do this more than 2-3 times without wrapping code off the screen, which leads to creating lots of pointless little functions.  The result is much harder to read than just using goto to break out when an error is encountered.

Name: >>71 2012-12-05 22:42

*x = func4(buf);

Whoops.

*f = func4(buf);

Name: Anonymous 2013-08-31 18:28


It seems like most of our names for colors come from our German roots (blue/blau, green/grün, red/rot, etc.). But yellow is gelb in German, amarillo in Spanish, jaune in French, and giallo in Italian. I suppose the Italian seems closest, but perhaps they all have something in common?

Don't change these.
Name: Email:
Entire Thread Thread List