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

Pages: 1-4041-8081-120121-160161-200201-240241-280281-320321-360361-

C++ hatred

Name: Anonymous 2012-01-08 12:26

Why is C++ hated so much here in /prog/? Many good software are written in C++.

I'm aware that there are some problems in the language and it is considered "hard" to master it, but why do so many people hate it? What harm has it done?

Software can be written much quicker when using some scripting languages like Python. Software can be writte slightly quicker when using some managed language like Java. But when using those languages, the resulting program will require more resources to run. So there is place for C++.

For example, I bet the web browser of 99% people browsing /prog/ is written in C++. It's not perfect language, but it is the best language for complex program with relatively small CPU and RAM requirements.

Name: Anonymous 2012-01-08 12:26

I bet you're mother is written in C++. That's why she's such a slow-moving, ugly pig.

Name: Anonymous 2012-01-08 12:27

lol

U MENA HASKAL

C++ -> sage

Name: Anonymous 2012-01-08 12:28

This is what SEPPLES programmers actually believe!

Remember these two rules:
-If it ain't lisp, it's crap.
-Lisp is shit.

Name: Anonymous 2012-01-08 12:29

>>4
Tell me one good and widely used Lisp program.

Name: Anonymous 2012-01-08 12:32

>>5
I believe the reservation software on orbitz.com is written in Lisp.

Name: Anonymous 2012-01-08 12:36

Name: Anonymous 2012-01-08 12:44

>>6,7
I don't consider those as widely used. Well at least you proved that there really are people developing in Lisp seriously. Weird...

>>7
Thanks for the points. I normally get 0/10

Name: Anonymous 2012-01-08 12:59

>>8
Anytime bro.

Name: Anonymous 2012-01-08 13:00

>>5
The old Reddit.

Name: Anonymous 2012-01-08 13:03

C++ is shit.

For example, I bet the web browser of 99% people browsing /prog/ is written in C++
They usually develop their own class libraries instead using standard ones. And they use only a subset of C++. Thus you end reinventing the wheel. C++ is only useful for very big projects like web browsers, where every megabyte of memory and every cpu cycle is important to compete in a industry where every microsecond in a benchmark counts for marketing purposes.

But also take a look at memory leaks and bug reports on these C++ written browsers. Then you'll see why using that language is just wrong.

Name: Anonymous 2012-01-08 13:04

C++ is bloated OOP C done wrong. It's not compact, it's not as fast as it could be, it's not easy to develop, it's full of pitfalls, feature creep, overly complicated and not portable enough. It gets low-level things wrong and thus ruins the high-level abstractions it tries to give the programmer.

Name: Anonymous 2012-01-08 13:06

>>1
Many good software are written in C++.
They might be as well written in Brainfuck. That doesn't make Brainfuck a good language.
I'm aware that there are some problems in the language
Too many problems.
and it is considered "hard" to master it,
It's not hard to master, it's unnecessarily complex.
but why do so many people hate it? What harm has it done?
The same harm COBOL, BASIC and FORTRAN did: it hinders the development and use of better languages.
But when using those languages, the resulting program will require more resources to run. So there is place for C++.
We need better languages for system programming, C++ is not one of them. Until recently, nobody cared about making better system PLs, because if they did, they would just be discarded for being ``not C++''. And this is part of the harm it has done, along with C, COBOL, FORTRAN.
For example, I bet the web browser of 99% people browsing /prog/ is written in C++.
Again, it might be as well written in COBOL, it doesn't make COBOL any better.

Name: Anonymous 2012-01-08 13:11

>>13
Ok, could you list some of the worst problems that C++ has? Some problems that make it worth hating?

Name: Anonymous 2012-01-08 13:13

>>14
Have you read your C++FQA today?
http://yosefk.com/c++fqa/

It's a little outdated, since C++11 fixes some problems, and introduces some of its own.

Name: Anonymous 2012-01-08 13:13

One word: THE FORCED MANUAL MEMORY MANAGEMENT

Name: Anonymous 2012-01-08 13:18

>>11
C++ is only useful for very big projects like web browsers
So, is there any alternative languages for developing such programs?

Name: Anonymous 2012-01-08 13:19

>>17
Anything with a module system is better suited for large project than C++.

Name: Anonymous 2012-01-08 13:21

>>15
Have you read your C++FQA today?
I read some of the "Big picture issues" there. Most of them are just claims without exaples or proof.

It's a little outdated, since C++11 fixes some problems, and introduces some of its own.
So is there any point in that page in that case? I think not. New projects should use C++11 standard anyway.

Name: Anonymous 2012-01-08 13:21

>>18
Care to give any example?

Name: Anonymous 2012-01-08 13:22

>>11
web browsers, where every megabyte of memory and every cpu cycle is important
LOL!

Name: Anonymous 2012-01-08 13:22

>>16
There are many problems with garbage collection. It isn't suited for most of the projects that C++ is good in.

Name: Anonymous 2012-01-08 13:26

>>19
New projects should use C++11 standard anyway.
And not be able to compile their projects?

Name: Anonymous 2012-01-08 13:28

Alternatives to C++:

Objective-C is much better than C++. And Apple has invented for the latest version of the compiler this nice automatic memory management that inserts free() calls (well, the ObjC release message) at compile time so you end with code without GC.

C# is good too. It compiles to native code using ngen.exe. But unfortunately it's controlled by Microsoft.

Java is shit.

Name: Anonymous 2012-01-08 13:28

>>23
g++ has pretty good support already

Name: Anonymous 2012-01-08 13:34

>>24
Objective-C
No, No, NO! HORRIBLE! Even C++ has nicer syntax.

C#
It's okay I guess... as a language. But the resulting program is slow because of the GC.

Java is shit.
Nah, just slightly worse than C#.

Name: NIGGER 2012-01-08 13:35

Why all da hate, mah niggaz? Learn to accept each other.

A hold tight all mini-van people
It name mini-van people gone to jamaica
One driver a dozen conductor
Yeah! mini-van people gone to jamaica
One driver a dozen conductor yeah!
Where have all the jolly bus gone long time ago
Where have all the jolly bus gone I I I don't know hey
Now mi go a whisper mi nuh fi go ketch a mini-van
Some a hold on pon mi shirt and some a hold on pon mi hand
Some seh tek this mini-bus home seh tek this mini-van
This one to westmoreland this one to portland
This ya one out to trelawny this one to st ann
And the quickest way fi mek a dollar inna dem hand ya know
Mini-van people gone to jamaica
One driver a dozen conductor
Yeah! mini-van people gone to jamaica
One driver a dozen conductor tree!
Where have all the jolly bus gone long time ago
Where have all the jolly bus gone I I I don't know hey
Now mi left from work with one intention
Mi fi ketch a mini-van and go to portland
I will need rest from midday come three young woman
One a hold on mi shirt and one a hold on pon mi hand
Mi haffi put down mi bag and stand up as a man
And tek di conductor dem my position
One a go a westmoreland and one a go a st ann
But my destination is to portland
Give thanks to di mini-bus association
Who set di jolly business out a action
Name mini-van people gone to jamaica
One driver a dozen conductor
Yeah! mini-van people gone to jamaica
One driver a dozen conductor yeah!
Where have all the jolly bus gone long time ago
Where have all the jolly bus gone I I I don't know hey
Now mi go a whisper mi nuh fi go tek a mini-van
Some a hold on pon mi shirt and some a hold on pon mi hand
Some seh tek this mini-bus home seh tek this mini-van
This one to westmoreland this one to portland
This ya one out to trelawny this one to st ann
And the quickest way fi mek a dollar inna dem hand ya know
Mini-van people gone to jamaica
One driver a dozen conductor ya know
Mini-van people gone to jamaica
Where have all the jolly bus gone long time ago
Where have all the jolly bus gone I I I don't know hey
Now mi left from work with one intention
Just fi ketch a mini-van and go a portland
I will need rest from midday come three young woman
One a hold on mi shirt and one a hold on pon mi hand
Mi haffi put down mi bag and stand up as a man
And tek di conductor dem my position
Dem a go a westmoreland and one a go a st ann
But my destination is to portland dem name
Mini-van people gone to jamaica
One driver a dozen conductor
Where have all the jolly bus gone long time ago
Where have all the jolly bus gone I I I don't know
Dem have big one, small one, middle size one
Dem even a new one dem deh quarter million
Seh big one, small one, middle size one
Dem even have a one dem value quarter million dem name
Mini-van people gone to jamaica
One driver a dozen conductor
Mini-van people gone to jamaica
One driver a dozen conductor

Name: Anonymous 2012-01-08 13:36

>>26
Don't let the syntax scare you. It's a very nice language.

Name: Anonymous 2012-01-08 13:42

>>25
Why would anyone want to use that freetard shit?

Name: Anonymous 2012-01-08 13:55

>>25
So you would seriously recommend that a large project would try to use C++11 despite there being no compliant compilers yet? Not only that, you would recommend that a large project should rely on some bleeding edge unstable software that might or might not support parts of the language, and is untested?

Name: Anonymous 2012-01-08 14:16

>>28
But I enjoy coding in C++. C++ has better support and I really don't see any benefit in Obj-C compared to C++.

>>29
Because it's a good compiler. VC11 has pretty ok C++11 support as well.

>>30
Yes.

Name: Anonymous 2012-01-08 14:18

>>26
objective-c has *really* nice syntax, just different.
i tried it for a while instead of c++, and was much more productive

only problem is that its slow, so i switched back to c++

Name: Anonymous 2012-01-08 14:19

>>19
No examples? What. Look at the rest of the FQA.
So is there any point in that page in that case? I think not. New projects should use C++11 standard anyway.
Most of the points are as valid as ever, and, as I said, C++11 introduces flaws on its own.

Name: Anonymous 2012-01-08 14:20

>>31
The problem is that C++ is shit.

Name: Anonymous 2012-01-08 14:29

well, OP, c++ takes GOD's programming language, C, and taints it with disgusting faux-objects and hundreds of pages of horrible syntax extensions.

objective-c is a very nice extension to c, mainly because it is small, but it is unfortunately rather slow.

i have never used c#, because i run linux, but it seems to be a very nice programming language if you overlook that microsoft owns it.

Name: Anonymous 2012-01-08 14:31

>>35
C is not a good programming language. What the fuck are you smoking?

Name: Anonymous 2012-01-08 14:32

http://www.youtube.com/watch?v=KlPC3O1DVcg

C IS OBSOLETE
YOU MAD C-FAGS?
C++ IS KING

Name: Anonymous 2012-01-08 14:41

>>37
Stroustrup
sage

Name: Anonymous 2012-01-08 14:42

>>37
Bjarne tilts me so fucking bad.

Name: Anonymous 2012-01-08 14:43

>>37
C is obsolete, and so is C++.

Name: Anonymous 2012-01-08 14:50

>>37
expecting the creator of C++ to say anything logical about C

keep your bloat to yourself

Name: Anonymous 2012-01-08 15:28

C++ is used for games, if only because of the rate of growth and refinement of gaming technologies and the advance of hardware is pressuring game makers to improve their graphics and engines to a level like never before, requiring more power, and thus, to use a language needier on CPU than C++ would be a fallacy.

Name: Anonymous 2012-01-08 15:29

>>42
Why don't they write hand-optimized assembly, instead of C++?

Name: Anonymous 2012-01-08 15:41

>>43
Because they are poor programmers (proven by their usage of C++).

Name: Anonymous 2012-01-08 15:42

>>43 They already do. When necessary.

Name: Anonymous 2012-01-08 16:08

C++ is the only option if you want fast high level language.

Name: Anonymous 2012-01-08 16:10

>>46
>C++
>high level

Name: Anonymous 2012-01-08 16:12

>>47
>2012
>sucking dicks
Go back to /gay/

Name: Anonymous 2012-01-08 16:13

>>47
C and C++ are both high-level.

Name: Anonymous 2012-01-08 16:15

So is this new C++ fandom on /prog/ somehow linked with /g/ and rest of the imageboards going down?

I mean, the language is complete and utter shit, I don't see any competent programmer defending it, only shitty retarded ones.

Name: Anonymous 2012-01-08 16:16

>>50
Go back to using your toy languages. C++ is for real world.

Name: Anonymous 2012-01-08 16:26

>>50
Yes, when you see posts that are clearly made by mentally challenged people, they're from /g/.

Name: Anonymous 2012-01-08 16:37

LOL U MAD 2012 IMPLYING XD
These threads reek of imageboard users.

>>>47,48
Back to /g/, ``please".

Name: Anonymous 2012-01-08 16:40

C++ sucks, but there isn't any other viable choice if you're looking for a natively compiled, C ABI compliant, and widely supported language.

D looks very promising, but it's too early to be used for critical applications by industrial standards.

when going for/against a language, don't forget practical arguments as well as "BUT ITS LITPPPPPPPPPH"

anyone who _worked_ as a programmer won't be able to refute the first paragraph.

Name: Anonymous 2012-01-08 16:48

>>54
D is never gaining industry relevance, ever.

Name: Anonymous 2012-01-08 16:52

>>54
Go may just become that. Right now, it's far from perfect, but it's already quite usable. Give it some time.

Name: QUICK POLL 2012-01-08 16:59

>>54
What program do you use most?
A. editor
B. debugger
C. compiler

Name: Anonymous 2012-01-08 17:04

>>54
You might want to exclude web developers from programmers then. (Please do.)

Name: Anonymous 2012-01-08 17:06

>>54
everybody press >>54

Name: Anonymous 2012-01-08 17:07

>>54 natively compiled, C ABI compliant, and widely supported language
ANSI C?

Name: Anonymous 2012-01-08 17:10

>>60
Why not just create programs with hex editor?

Name: Anonymous 2012-01-08 17:11

>>54
when going for/against a language, don't forget practical arguments as well as "BUT ITS LITPPPPPPPPPH"
Sure, but would you mind define what makes a programming language ``practical''?

Lots of libraries? Then no new language will ever be practical.
Standard C FFI interface? It may be impratical to implement if the platform isn't C-based.
Standard C API? Then I either must write the implementation in C the way the interface, or implement the interface and pay some performance overhead because my internal API does not map 1:1 with it.
Standard ABI? Then I'm stuck with that ABI, and I can't improve on it without breaking everything. Also, portability issues.
Standard FFI? It must be flexible/abstract enough to accomodate any platform and calling convention that existed, exist, and will ever exist.
Is this just mental masturbation? C will be the standard for at least another 20 years? See the Y2K problem. 20 years are fucking nothing.

So, what's ``practical'' in your mind?

Name: Anonymous 2012-01-08 17:39

>>61 LOL!

Name: Anonymous 2012-01-08 18:08

I like C++ and there's nothing you can do about it.

I know C++, C, Python, Java, C#, Javascript, PHP, PL/SQL plus some BASIC craps. From these, C++ is my favourite. I very much enjoy writing C, which is very different from writing C++, and it's not very productive. I also enjoy very much writing Python, which is fast to write, but ridiculously slow. I very much enjoy writing in C++, which is more productive than C and as fast C (if programmed well).

Of course, the chosen language depends on project. For most web stuff and misc scripting I would use Python. For desktop most applications I would use C++. For embedded micro chip programming I would use C.

Also, Lisp is shit.

Also, even though GC is shit, I'm planning on learning some FP language.. maybe OCaml or Haskell.

Name: Anonymous 2012-01-08 18:31

It may be impratical to implement if the platform isn't C-based.

Most high level languages are a superset of C-based. It is hard to find high level language that doesn't have some equivalent to the function call stack. If a language was designed to work well with such architectures, the restrictions would be evident, and you would only want to put up with the restrictions if you were writing code for that architecture. It's true that it woulnd't make sense to use a FFI for C in this scenario, but you probably wouldn't want to use the language on different architectures.

Name: Anonymous 2012-01-08 18:41

>>64
>c++ is as fast as C
You obviously don't know shit, so your opinion is now irrelevant.

Name: Anonymous 2012-01-08 18:42

It is hard to find high level language that doesn't have some equivalent to the function call stack.
Stackless Python.

Name: Anonymous 2012-01-08 19:03

>>64
SPOKEN LIKE A TRUE PHP PROGRAMMER!

Name: Anonymous 2012-01-08 19:13

It's as if big projects simply can't handle all that code and need to be either implemented on leaky C++ or enterprise Java/C#.

A shame really.

Name: Anonymous 2012-01-08 19:27

>>65
Most high level languages are a superset of C-based. It is hard to find high level language that doesn't have some equivalent to the function call stack.
Cactus stacks, segmented stacks, stack implemented as a linked list of activation records instead of a contiguous block of memory, and even CPS exist today.
C's (most) calling conventions are not suitable for tail calling (and, thus, CPS), multiple arity functions, and Lisp-style varargs (put everything in a list, which is the same as Python's).
Implementations must either jump through several hoops to get C interop, or maintain two stacks (the C stack, and its stack), or rape the C stack and use that.

Name: Anonymous 2012-01-08 19:45

>>70
stack implemented as a linked list of activation records instead of a contiguous block of memory
That's how the IBM System/360 and System/38 and their descendents do it. Arguments are also passed as a pointer in a specific register and stored in an entirely different location than the return address stack, and automatic variables are allocated from a heap and then deallocated before the procedure returns.

Name: Anonymous 2012-01-08 19:47

>>65
Most high level languages I know are a superset of C-based
fixed that for you!

Name: Anonymous 2012-01-09 9:47

>>66
Well, actually one can make cleaner and faster code in C++ than one can with C. Templates are very useful.

Name: Anonymous 2012-01-09 9:51

>>73
Templates are fucking slow. Debug them low-level if you can. So no, try again.

Name: Anonymous 2012-01-09 9:59

Name: Anonymous 2012-01-09 9:59

>>74
eh?? they only slow down the compilation process. They are not processed runtime.

Name: Anonymous 2012-01-09 10:05

>>64
DKIYT, but other than JavaScript thats a pretty blubby list of languages. You should at least try some of the symbol manipulation languages more (Haskell isn't really one of them, Lisp is).

Name: Anonymous 2012-01-09 10:31

>>73
Templates are absolute shit. The merits and demerits of C++ are surely somewhat debateable, but templates being garbage is an objective fact.

Name: Anonymous 2012-01-09 10:40

>>77
Hmm.. I might try some Lisp at some point, but Haskell seems more interesting right now. As a toy language of course, since C++ is for real stuff ;-) (don't take it too seriously)

>>78
Your "fact" seems to be quite subjective actually.

Name: Anonymous 2012-01-09 12:55

>>79
Haskell is definitely not a superset of C-based, though.

Name: Anonymous 2012-01-09 14:00

>>73
templates are a very bad solution for generic programming.
they have inconsistent implementation across compilers (even today, 20 years after templates have been "standardized"), horrible compile-time implications, absolutely impossible to debug (try debugging a boost class, I dare you) - even the compilation errors they cause require some skill and experience in order to decipher.

there are much better attempts at generic programming - .NET generics / dynamically-bound languages like python, and in some cases - even C macros are a better choice.

Name: Anonymous 2012-01-09 14:10

>>76
they also cause serious code bloat, which leads to more RAM consumption,paging and cache misses

here's a nice example: compile hello world using printf, and using cout. you'll see that iostream example results in a 10-20 times larger binary

Name: kodak_gallery_programmer !!mJxde8AUB5oQyXO 2012-01-09 14:31

>>82
And what happens when you strip out the debugging symbols?

Name: Anonymous 2012-01-09 14:32

>>83
Why is your tripcode changed?

Name: Anonymous 2012-01-09 14:35

>>84
To keep one step ahead of the filters.

Name: Anonymous 2012-01-09 14:41

>>85
Can't they just filter your name?

I mean, what's keeping someone else from just choosing a random tripcode and use the name kodak_gallery_programmer? I'd believe it was you (I'm assuming the person I'm talking to actually is you, kodak) as long as they regularly called people mental midgets and told them to scrub another toilet.

Name: Anonymous 2012-01-09 14:46

>>86
And then he was the toiler scrubber.

Name: Anonymous 2012-01-09 15:09

>>83
user@host ~/prog % echo -e '#include <iostream>\nint main(int argc, char *argv[]){std::cout << argv << " " << argc << std::endl;return 0;}'|g++ -O0 -static -o test-cpp -xc++ -
user@host ~/prog % echo -e '#include <stdio.h>\nint main(int argc, char *argv[]){printf("%s %d\\n",argv,argc);return 0;}'|gcc -O0 -static -o test-c -xc -   
user@host ~/prog % ls -l test-c*
-rwxrwxr-x 1 user group  725293 Jan  9 21:08 test-c
-rwxrwxr-x 1 user group 1476888 Jan  9 21:08 test-cpp
user@host ~/prog % strip test-c*
user@host ~/prog % ls -l test-c*
-rwxrwxr-x 1 user group  569052 Jan  9 21:08 test-c
-rwxrwxr-x 1 user group 1046276 Jan  9 21:08 test-cpp


Yeah.

For your information, even an unstripped Go program that does the same is smaller than the C++ one.

Name: Anonymous 2012-01-09 17:30

C++ programs are larger by definition mainly because of static initializations and exception frames. In ELF targets, these things go on separate code sections, which enlarge the binary a bit further because of headers and alignments. Usual GNU-produced ELF targets are ridiculously bloated when compared to the average PE executable (just take a look at the number of sections generated for a simple Hello World C program).

If one strip out exceptions (-fno-exceptions in GCC) and avoid static initializations, the final executable has about the same layout any C executable would. The C++ boot code is also more complex, since it needs to walk through the initializer list and perform the forementioned static initialization, which is non-existent in C. This adds a bit more in its size.

The worst problem in C++ is the toolchain and the utterly ridiculous standard library. The language design is ok, put apart a number of warts (such as the need for three damn cast operators).

Once you get rid of the fat standard library, C and C++ programs are as slim as assembly-language programs to a great extent. Putting apart the standard C++ library is not a great loss, and it is rather easy to implement the necessary things in freestanding C++, both in Windows and Linux. (In Windows, by the way, the freestanding environment is actually the default one.)

Name: Anonymous 2012-01-10 3:59

>>81
.NET generics
Not as powerful as C++ templates.

C macros
They are powerful, but harder to read (for humans) compared to C++ templates. C++ templates are slightly safer.

Conclusion: C++ templates are good.

Name: Anonymous 2012-01-10 4:47

>>15
I only read some random part a while ago, which turned out to be the part about why operator overloading in C++ is broken. Such utter BS. Didn't bother to read anything else after that.

Name: Anonymous 2012-01-10 4:52

Actually I made up the term ‘object-oriented’, and I can tell you I did not have C++ in mind.
    — Alan Kay

“There are only two things wrong with C++: The initial concept and the implementation.
    — Bertrand Meyer

 "Fifty years of programming language research, and we end up with C++ ??" - Richard A. O'Keefe

 "C++ is an insult to the human brain." - Niklaus Wirth

"Whenever the C++ language designers had two competing ideas as to how they should solve some problem, they said, 'OK, we'll do them both'. So the language is too baroque for my taste." - Donald Knuth

"C++ is a horrible language. It's made more horrible by the fact that a lot of substandard programmers use it, to the point where it's much much easier to generate total and utter crap with it." - Linus Torvalds

"C++ is shit" - Me

Name: Anonymous 2012-01-10 4:54

>>92

"If it aint Lisp, it's a shit." -- Lisper

Name: Anonymous 2012-01-10 4:55

C++ templates are so bad they need a whole book dedicated to them.

http://www.josuttis.com/tmplbook/tmplbook.html

Name: Anonymous 2012-01-10 5:10

>>89
In what way is STL a bad thing? Easy to use, powerful, etc.

Name: Cudder !MhMRSATORI!FBeUS42x4uM+kgp 2012-01-10 5:25

Usual GNU-produced ELF targets are ridiculously bloated when compared to the average PE executable
Is there a gcc option to link and merge all sections into one? This is easy with MSVC and the /merge option.

>>95
And bloated.

Name: Anonymous 2012-01-10 5:32

>>96
Are you saying that it results in large binaries? Otherwise I don't see what you mean.. How would you avoid this bloat when implementing the same functionality (or the subset you need) in C++?

Name: Anonymous 2012-01-10 5:45

Name: Anonymous 2012-01-10 6:16

yeah the one thing linus turdballs can actually be correct about is how much c++ sucks a dick

Name: Anonymous 2012-01-10 7:04

doubles

Name: Anonymous 2012-01-10 10:49

>>98
srsly, Linus sounds like an angry nerd :|
childhood hero ruined.

Name: Anonymous 2012-01-10 11:25

>>92
Good job! You quoted bunch of people who hate C++. Nice argument!

>>98
http://warp.povusers.org/OpenLetters/ResponseToTorvalds.html
So does this. These links mean nothing. Try the language and decide it yourself if it's a good one or not. Don't listen to haters.

Name: Anonymous 2012-01-10 11:36

>>101
angry nerd

He is just like us!!!!!

Name: Anonymous 2012-01-10 11:42

``As dinosaurs (who code exclusively in C) are becoming extinct, you will soon find yourself alone with attitude like this.''
- dude's reply to torbals

LOL!

Name: Anonymous 2012-01-10 11:46

C++ is ugly shit.

Name: Anonymous 2012-01-10 11:47

>>105
So is your mom.

Name: Anonymous 2012-01-10 11:47

C++ actually has only one feature the other languages don't have:
Trick everyone into the idea that it is the official successor of C.

Name: Anonymous 2012-01-10 11:52

>>102
http://warp.povusers.org/OpenLetters/ResponseToTorvalds.html
C++ advocates are unimaginative and go for the soviet solution:
Use shit psychiatry and institutionalize the dissidents.

Name: Anonymous 2012-01-10 11:56

>>103
FUCK YUO im not angry,
I AM CODAN

Name: Anonymous 2012-01-10 11:58

>>102
I quoted:
- Alan Kay, inventor of Smalltalk, object-oriented programming and colaborator on the first GUIs at Xerox
- Bertrand Meyer, inventor of Eiffel
- Richard A. O'Keefe, computer scientist author of researching and books on logical programming and Prolog
- Niklaus Wirth, inventor of Pascal and Modula/Modula-2 languages.
- Donald Knuth. What should I say about this man? He've won a fucking Turing Award and he's written The Art Of Computer Programming. I bet you don't even know this book existed.
- Linus Torvalds, creator of the Linux kernel and git.

Maybe you didn't know these people or what they've done. But you should at least listen to what these people have to say. Because they have actually archieved something in computer science and engineering.

Name: Anonymous 2012-01-10 12:00

C++ introduces more problems to software development, it has a low quality standard library that nobody uses in large projects, it's slow, because the only thing it brings from object-oriented languages is Vtable dispatch, so you end up with a language that is as slow as a native/JIT-compiled high-level object-oriented language without the features of a true high-level object-oriented language, can't even define pure virtual/interface-like methods without a "virtual ... = 0;" weird syntax, no big OS brings a C++-base API (Windows uses C, Apple uses Objective-C, GTK+ uses C, only Qt uses C++ but without using the standard C++ library, and take a look at how full of bugs KDE releases are sometimes).

C++ is the main culprit of how big projects like Firefox need constant updates and bugfixes to fix memory leaks and security holes.

Name: 102 2012-01-10 12:11

>>110
I knew 3 of those people (and now I know all of them). Yeah, they are smarter than me. That does not mean they are correct when they're saying C++ is horrible. Many smart people C++ is good (or at least ok) language.

I bet you don't even know this book existed.
I do know it. I bought the first chapter few months ago. I've just read maybe 50 pages (trying to figure out at least some of the exercises... ok it's fucking collecting dust in the shelf, too 'busy' right now).

C++ is not perfect. But there is no real alternatives to it, high level, compiling to native code and fast runtime (GC is too slow for some cases). Maybe Ada? Maybe not.

Name: Anonymous 2012-01-10 12:32

>>110
Argumentum ad verecundiam.

Name: Anonymous 2012-01-10 12:34

>>113
It isn't a fallacy in this case, and you know it.

Name: Anonymous 2012-01-10 12:53

>>102
I tried it. C++ is shit.

Name: Anonymous 2012-01-10 12:59

>>115
I tried GC. GC is shit.

Name: Anonymous 2012-01-10 13:13

>>115
>>116

I like C++ and GC. umad faggots?

Name: Anonymous 2012-01-10 13:18

>>114
Oh, silly me!

Name: Anonymous 2012-01-10 13:20

C++ is shit. Thread reported.

Name: Anonymous 2012-01-10 14:05

>>119
report my anus

Name: Anonymous 2012-01-10 14:40

>>112
C++ is not perfect. But there is no real alternatives to it,

C.

Name: Anonymous 2012-01-10 14:49

Why not try D?

Name: Anonymous 2012-01-10 15:09

>>122
maximum trollpost

Name: Anonymous 2012-01-10 15:17

>>115->>120

THREAD DESTROYED

Name: kodak_gallery_programmer !!kCq+A64Losi56ze 2012-01-10 15:29

>>122
You might as well ask "Why not try on a pair of pantyhose?".

Name: Anonymous 2012-01-10 15:30

>>125
Go learn some basic mathematics, mental midget.

Name: Anonymous 2012-01-10 15:32

Name: Anonymous 2012-01-10 15:34

Hey Kodak, remind me what a subset is again? Oh wait, you can't!

Name: kodak_gallery_programmer !!kCq+A64Losi56ze 2012-01-10 15:41

>>128
One that doesn't include the empty set?

Name: Anonymous 2012-01-10 15:45

>>129
A subset may include the empty set, if that's what you're asking.

Name: kodak_gallery_programmer !!kCq+A64Losi56ze 2012-01-10 15:48

>>130
I believe a subset that includes the empty set is a "proper subset". But you tell me. I mean, you're the hourly worker that googles shit.

Name: Anonymous 2012-01-10 15:49

>>131
You're wrong.

Name: Alpha Male !gD3Op2fhHs 2012-01-10 15:53

>>131
Man you hella dumb if you need to Google what a subset is.

Name: Anonymous 2012-01-10 15:55

>>129,131
A subset can include the empty set if the original set does. I think you're confusing it with the power set or something. A subset is not a set of sets unless the original set is.

Name: Anonymous 2012-01-10 15:55

>>133
Go scrub another toilet bitch.

Name: >>134 2012-01-10 15:57

>>131
This post is just completely wrong. {1,2,3} is a proper subset of {1,2,3,4}.

Name: kodak_gallery_programmer !!kCq+A64Losi56ze 2012-01-10 15:58

>>134
Nah, this comes from a programming project at work. I had a case where every elment in A and B were such that A was an element of B. But the rest of the idiots on here wouldn't know about such things because they just work general labor jobs -(.

Name: Anonymous 2012-01-10 15:59

>>136
I said "I believe" you fucking mental midget. Geeze, go google more shit instead of looking for a job.

Name: Alpha Male !gD3Op2fhHs 2012-01-10 16:02

>>135
You jelly that I am aesthetic and intelligent while you're just an ugly manlet that too dumb to understand even basic mathematics?

You mirin brah?

Name: Anonymous 2012-01-10 16:04

>>139
You're still a huge faggot.

Name: Anonymous 2012-01-10 16:04

>>137
I work as an X (for some X), therefore the subset of a set is uncomputable.

Name: Anonymous 2012-01-10 16:07

Where performance is critical, C++ is a pretty good choice. Anyone care to say otherwise? C is good also in this respect, but I prefer C++ because of its extra features (OOP, template metaprogramming, function overloading to name a few). Its downside is its bloat.

Name: Anonymous 2012-01-10 16:10

>>142
Smalltalk did a much better job at OOP than what C++ did.

Name: Anonymous 2012-01-10 16:15

>>143
I haven't used Smalltalk personally. In what way did it do a better job?

One more thing I forgot to mention about C++. The thing that brings it down the most is its header/source model. I heard C++11 was supposed to have modules, but now it's expected for TR2.

Name: Anonymous 2012-01-10 16:16

>>142
Anyone care to say otherwise?
Me. Better languages can give the compiler much more optimization hints than C++.
You don't imagine how much time and resources we spent on making C and C++ go fast.

Name: Anonymous 2012-01-10 16:17

>>137
I had a case where every elment in A and B were such that A was an element of B.
I can't tell what you're trying to say. It sounds like you googled the definition of subset, tried to paraphrase so it didn't look like you were just copying and pasting, and failed miserably.

Also, going back to >>129, what does the empty set even have to do with subsets? {∅} is a subset of {∅,2}, just like {1} is a subset of {1,2}.

>>138
So if you say "I believe", nobody can call you on being wrong? Nice.

go google more shit
This is pretty simple stuff. I wouldn't be challenging other people's knowledge if I didn't even know what a proper subset was.

Name: Anonymous 2012-01-10 16:18

>>144
At everything.

Name: Anonymous 2012-01-10 16:19

>>144
Good luck shoehorning modules and lambdas in a 20 years old language, TR2 committee.

Name: kodak_gallery_programmer !!kCq+A64Losi56ze 2012-01-10 16:19

>>146
It was a case in a programming project you fucking retard. Oh wait, you don't work as a programmer!

Name: Anonymous 2012-01-10 16:20

>>146
Now, for the 9th time you autistic fucker, what do you do for a living?

Name: Anonymous 2012-01-10 16:24

>>149
You're right, I'm a senior Comp Sci major. But apparently being a programmer doesn't teach you shit about set theory, because you have no clue what you're talking about. Since you're so smart, stop it with the ad hominems and answer the next part of my post. I'll post it again, since you conveniently missed it last time.

What does the empty set even have to do with subsets? {∅} is a subset of {∅,2}, just like {1} is a subset of {1,2}.

Name: Anonymous 2012-01-10 16:24

>>146
Try to ignore him, he's just another code monkey with no mathematical ability or talent, as a result he lacks the understanding of things like clear notation or logical thought.


I mean any person who writes

I had a case where every elment in A and B were such that A was an element of B.
clearly has no training in mathematical thought, and would be straight out laughed at by anyone with a basic level of knowledge.

Name: kodak_gallery_programmer 2012-01-10 16:26

>>151
There are several no trivial programming situations where the empty set is included in the subset. Also, you little fucking know it all moron, there is a vast difference between "googling shit" and "the real world".

So now, have many job offers have you gotten?

Name: Anonymous 2012-01-10 16:27

>>152
Those toilets aren't gonna scub themselves!

Name: Anonymous 2012-01-10 16:28

>>153
So now, have many job offers have you gotten?
Several, and non-trivial.

Name: Anonymous 2012-01-10 16:28

>>145
Could you name these better languages? I can think of a few things C/++ could do to help the compiler, but I can't think of a language that actually has them (possibly because I don't know too many :p).

>>148
Well, implementing lambda's wasn't difficult at all. It actually works out quite nicely consider C++ already had functors.

@People talking about sets: A class of sets contains the empty subset. You can't consider a set in its own right to contain it.

A proper subset is a subset that isn't equal to its superset.

Name: Anonymous 2012-01-10 16:28

>>155
I don't believe you.

Name: Anonymous 2012-01-10 16:29

>>155
Well, let me take that back, I believe that you probably got an offer for a $10/hr tech support job.

Name: Anonymous 2012-01-10 16:31

>>155
Does that mean that Starbucks offered you a position of janitor, while McDonalds made an offer for a cashier position, and you find it non-trivial to decide?

Name: kodak_gallery_programmer !!kCq+A64Losi56ze 2012-01-10 16:31

>>156

Well, implementing lambda's wasn't difficult at all. It actually works out quite nicely consider C++ already had functors.


What the hell are you smoking?

Name: Anonymous 2012-01-10 16:31

Kodak is a fucking retard, that he doesn't know basic mathematics illustrates that. The only highlight of his life is that some shitty company settled for him when they were looking for disposable code monkeys and when someone has a better job than him he just says that he doesn't believe them.

Name: Anonymous 2012-01-10 16:31

>>128
Hey Kodak, remind me what a subset is again?
>>129
One that doesn't include the empty set?
...

>>153
There are several no trivial programming situations where the empty set is included in the subset.

That's it, I'm done. You are so fucking stupid.

Name: Anonymous 2012-01-10 16:34

>>160
Lambda's in C++ are essentially anonymous functors. What's missing, exactly?

Name: Anonymous 2012-01-10 16:34

>>162
I'm not the idiot that doesn't work as a computer programmer. Now go run off scrub another toilet. Again, you have no possible future as a computer programmer.

Name: Anonymous 2012-01-10 16:35

>>162
Remember, no logical thought and no clear syntax. I think he actually might be brain damaged since his English is riddled with mistakes as well and he seems to forget what he typed just a minute ago.

Name: kodak_gallery_programmer !!kCq+A64Losi56ze 2012-01-10 16:35

>>161
Vs. being some unemployed idiot who googles shit?

Name: Anonymous 2012-01-10 16:35

>>164
I'm not the idiot that doesn't work as a computer programmer.
Yeah, you're the idiot that does.

Name: Anonymous 2012-01-10 16:36

>>163
A brain?

Name: Anonymous 2012-01-10 16:36

>>167
So are you going to take the $10/hr tech support job?

Name: Anonymous 2012-01-10 16:37

Hey Kodak, this is your daily reminder that every subset of a countable set is countable.

Just keep denying the mathematical truth, I'm sure it'll change some day! (Oh wait...)

Name: Anonymous 2012-01-10 16:38

>>168
Do you know how functors work in C++?

Name: Anonymous 2012-01-10 16:41

Name: Anonymous 2012-01-10 16:42

>>172
What is your fucking point you god damned retard? Every subset of a countable set is also countable still holds true.

Name: Anonymous 2012-01-10 16:43

>>156
Immutable-by-default and mutability annotations would be a start.
First class support for statically checked contracts (with dynamic checks when needed) on functions and data structures.
A better type system, and an effect/region system.
implementing lambda's wasn't difficult at all. It actually works out quite nicely
You cannot make polymorphic lambdas, so no.

Name: Anonymous 2012-01-10 16:43

>>172
What has that got to do with what he said? He's right, every subset of a countable set is countable.

Name: Anonymous 2012-01-10 16:46

>>173
That you have no clue as to what you're talking about. Now, for the 10th time, what do you do for a living?

Name: Anonymous 2012-01-10 16:46

>>175
I never said he wasn't right. I'm just saying he's a tad bit confused on what he just "googled".

Name: Anonymous 2012-01-10 16:48

>>172
en.m.wikipedia.org
Why.

Name: Anonymous 2012-01-10 16:48

wtf this thread just went to shit
BTW: if you're not a complete tool or have atleast a hint of logical thinking you can do stuff even without knowing 'big bad math buzzwords'

Name: Anonymous 2012-01-10 16:48

>>176
Are you completely incapable of following a simple mathematical evidence? The statement that every subset of a countable set is also countable is a proven statement, most proofs are just a single sentence long actually. Why do you continue to deny it?

Name: kodak_gallery_programmer !!kCq+A64Losi56ze 2012-01-10 16:48

>>178
That wasn't me you moron.

Name: kodak_gallery_programmer !!kCq+A64Losi56ze 2012-01-10 16:49

>>180
I never said it wasn't. Again, for the second time, you don't seem to understand what you just "googled".

Name: Anonymous 2012-01-10 16:50

>>179
I mean this thread was shit to begin with, then went to shit a couple of times,
the shittiness of this thread increases exponentially everytime someone posts

Name: Anonymous 2012-01-10 16:50

>>170
THIS IS WHAT THE JEWS WANT YOU TO BELIEVE IT'S ACTUALLY NOT TRUE KODAK HOLDS THE REAL TRUTH
#EVERYSUBSETOFACOUNTABLESETISALSOCOUNTABLEDENIERSDOTORG
KEEP FIGHTING THE CONSPIRACY

Name: Anonymous 2012-01-10 16:50

>>166
Yet, Kodak-kun, you are here among us, almost 24 hours a day, everyday. Don't you have some work to do at kodak?

Name: Anonymous 2012-01-10 16:51

>>185
I'm done for the day -).

Name: Anonymous 2012-01-10 16:54

>>182
I never said it wasn't
Oh really? Let us check out some posts in this thread http://dis.4chan.org/read/prog/1326089963

Check out posts 75 and 76 (where you also say that the interval [0,1] is a subset of the natural numbers) in 129 you say that the statement breaks down under certain conditions.

Name: Anonymous 2012-01-10 16:57

>>187
Go scrub another toilet you mental midget I'm done with you.

Name: Anonymous 2012-01-10 16:57

>>187
You're problem is that keep asserting absolute truth.

Name: Anonymous 2012-01-10 16:58

>>189
But it is absolutely true, have you no idea of what a proof is?

Name: Anonymous 2012-01-10 16:59

>>188
I'm not the idiot that doesn't understand what they're reading. Come back again when you understand what you just read.

Name: Anonymous 2012-01-10 16:59

Let us call a set "abnormal" if it is a member of itself, and "normal" otherwise. If N is a set of all normal sets, is N normal or abnormal?

Name: Anonymous 2012-01-10 16:59

lolol kodak cant do maths

Name: Anonymous 2012-01-10 17:00

>>190
Absolute truth, in math, would imply necessary and sufficient. You haven't provided both. Now go scrub another toilet.

Name: Anonymous 2012-01-10 17:00

>>187
Wow, not that he had much integrity before, it's all gone now.

Name: Anonymous 2012-01-10 17:00

>>193
Go 'lolol' some more for you fellow grade school friends you fucking illiterate dweeb.

Name: Anonymous 2012-01-10 17:01

>>196
This is all he has left, calling people names, what a sad person.

Name: Anonymous 2012-01-10 17:03

>>195
And what happens if I have a ring in a field? Ya know, maybe I wold  want this kind of scheme to verify the strength of a password.

Name: Anonymous 2012-01-10 17:04

>>198
Look at him, there he goes again trying to sound smart by posting something completely unrelated and full of errors, look at him and laugh /prog/.

Name: Anonymous 2012-01-10 17:04

C++heck 'em.

Name: Anonymous 2012-01-10 17:05

>>197
But that's all that he has ever had.

Name: Anonymous 2012-01-10 17:05

>>199
No, it's an example from you uneducated faggot.

Name: Anonymous 2012-01-10 17:05

>>199
>>198
So, you hate yourself and are samefagging.

Name: Anonymous 2012-01-10 17:06

>>202
Look, now he can't even form simple sentences anymore, he's breaking down completely now.

Name: kodak_gallery_programmer? 2012-01-10 17:07

>>199
And what happens if I have something like

{1,2,3,4,5,6,7,9,10}

{5} --> {1}
{7} --> {1}
{9} --> {1}

Name: Anonymous 2012-01-10 17:08

>>205
And now what happens if I extend this to some large number N? How would I determine how many {1}'s I have in this case?

Name: Anonymous 2012-01-10 17:09

>>205
that would be a surjective mapping. i don't know what your point is

Name: Anonymous 2012-01-10 17:09

>>204
Go 'lol' some more for your grade school friends you fucking retard.

Name: Alpha Male !gD3Op2fhHs 2012-01-10 17:10

Hey Kodak this might not be a good moment to tell you, but I kind of banged that chick you think is cute, you know that chick from work? Good luck though brah, I'm sure if you scrub some more toilets that you'll be able to afford that leg extension operation you wanted so you'll no longer be as much of a pathetic manlet, you'll still be beta though so no chicks will bang you except for perhaps 3/10 chicks that are drunk.

Name: kodak_gallery_programmer !!kCq+A64Losi56ze 2012-01-10 17:10

>>207
The point is that I can't determine how many {1}'s I have in this set. In other words, it would be uncountable.

Name: Anonymous 2012-01-10 17:12

>>205
Nothing, {5}, {7} and {9} are all countable just like {1,2,3,4,5,6,7,9,10}, so the proposition is still true. Keep trying and failing though.

Name: Anonymous 2012-01-10 17:12

>>209
Yeah, that's about the extend of your IQ. BTW, you're still a huge fucking faggot.

Name: Anonymous 2012-01-10 17:13

>>210
Well then whatever set you're talking about isn't a subset of {1,2,3,4,5,6,7,9,10} so you have proven nothing, if it were then it would be countable.

Name: kodak_gallery_programmer !!kCq+A64Losi56ze 2012-01-10 17:13

>>211
I was asking for the number of duplicate {1}'s.

Name: Anonymous 2012-01-10 17:14

>>210
You're a high school dropout, aren't you?

Name: Anonymous 2012-01-10 17:15

>>213
{5} -> {1} ===> {{5}, {1}}

Name: Anonymous 2012-01-10 17:15

>>214
Then you're not talking about any subset of {1,2,3,4,5,6,7,9,10} so you've achieved nothing. The proposition states that any subset of a countable set is countable, how is this difficult?

Do you even know what a subset is?

Name: Anonymous 2012-01-10 17:15

>>215
You still don't get it, do you. Again, do I determine the number of {1}'s in this kind of scenario?

Name: Anonymous 2012-01-10 17:16

>>216
Still, what is your point? Neither {5} or {1} is in {1,2,3,4,5,6,7,9,10} so neither of those are subsets.

Name: Anonymous 2012-01-10 17:16

>>217
I want how I would determine the number of {1}'s that are generated from this set of numbers.

Name: Anonymous 2012-01-10 17:17

>>219
You still haven't answer my question.

Name: Anonymous 2012-01-10 17:17

>>218
Again, do I determine the number of {1}'s in this kind of scenario?
I have no fucking clue but it's completely irrelevant to the matter at hand.

Name: Anonymous 2012-01-10 17:18

>>221
Your question has absolutely nothing to do with the proposition that every subset of a countable set is countable, so there's no point in answering it.

Name: Anonymous 2012-01-10 17:19

>>214
I was asking for the number of duplicate {1}'s.
Sets can't have duplicates.

Name: kodak_gallery_programmer !!kCq+A64Losi56ze 2012-01-10 17:19

>>222
That's why you have no future as a computer programmer. You don't know when this kind of situtation would arise nor do you know how you would approach such a programming problem.

Now shut up and go google more shit.

Name: Anonymous 2012-01-10 17:19

>>224
His question isn't well defined anyway, he's just rambling about some random unrelated shit in an attempt to look smart.

Name: Anonymous 2012-01-10 17:20

>>224
But what it maps to can.

Name: Anonymous 2012-01-10 17:20

>>225
What the fuck are you smoking you fucking retard? What you asked has nothing to do with the statement that every subset of a countable set is countable.

Name: Anonymous 2012-01-10 17:21

>>226
It's a programming problem from work you mental midget.

Name: Anonymous 2012-01-10 17:21

It's the ``in Lisp'' guy all over again.

Name: Anonymous 2012-01-10 17:22

>>229
And what does it have to do with the statement that every subset of a countable set is also countable? Because that's still fucking true, it will always hold true and you're a fucking retard for denying it.

Name: Anonymous 2012-01-10 17:22

>>229
Do your own (home)work.

Name: kodak_gallery_programmer !!kCq+A64Losi56ze 2012-01-10 17:22

>>228
Shut up and let the adults talk. Better yet, go run off and 'lol' with your grade school friends.

Name: Anonymous 2012-01-10 17:23

>>205,206,214
This is the worst strawman I have ever seen.

Name: kodak_gallery_programmer !!kCq+A64Losi56ze 2012-01-10 17:24

>>232
No, again, it's a problem that arose during a programming project at work. I don't know many many more times I have to repeat this for you.

So now, on a more positive note, are you going to take the $10/hr tech support job?

Name: Anonymous 2012-01-10 17:25

>>210
Yes but that uncountable set wouldn't be the subset of a countable set, so the proposition is still true.

Name: Anonymous 2012-01-10 17:25

>>210
If they all map to 1, then the set only has one element, which is 1. What are you saying?

Name: Anonymous 2012-01-10 17:26

>>235
That's cute, yes. We're not here to solve your cute, broken math programming projects.

Name: Anonymous 2012-01-10 17:27

>>237
Yeah.

Name: Anonymous 2012-01-10 17:27

>>210
Kodak, just answer a single thing, how does this disprove the statement that every subset of a countable set is also countable?

Name: Anonymous 2012-01-10 17:27

>>239
Well, the set that only contains 1 is countable, let me count it for you, 1, there I'm done.

Name: Anonymous 2012-01-10 17:27

>>238
It's a math problem that came up during a programming project.

Name: Anonymous 2012-01-10 17:28

>>242
You and your colleagues are fucking retards who don't know mathematics.

Name: Anonymous 2012-01-10 17:28

`
>mfw
>claims to have graduated from Berkeley
>cant do simple maths

Name: Anonymous 2012-01-10 17:29

>>241
Yeah, but now how do I determine the inverse?

Name: Anonymous 2012-01-10 17:29

>>242
It's also broken, or you didn't understand the question. The problem lies in you.

Name: Anonymous 2012-01-10 17:29

>>243
This is coming from some fag who just knows how to google shit.

Name: Anonymous 2012-01-10 17:30

>>245
The inverse of a set doesn't make any sense, do you mean the inverse of the map? That's impossible of course, it has multiple values that map to a single value, yet this has absolutely nothing to do with the statement that every subset of a countable set is also countable.

Name: Anonymous 2012-01-10 17:31

>>246
No and no. The reason why you can't see "this" is because don't have programmer blood in you. Now run along and go scrub another toilet.

Name: Anonymous 2012-01-10 17:32

>>248
Yeah, the inverse of a map. Let's say we can determine the inverse. How many {5}'s, {7}'s, and {9}'s would I have?

Name: Anonymous 2012-01-10 17:33

>>249
So your inability to form coherent questions and well defined mathematical problems lies with him?

You still haven't disproved that every subset of a countable set is countable, go along and do that now. You just need a single instance and the statement is false, find me a single instance of a countable set which has an uncountable subset, go ahead.

Name: Anonymous 2012-01-10 17:34

>>250
And with a little imagination, you can have something like

Mary --> 5
Jenny --> 7
Kay --> 9

Name: Anonymous 2012-01-10 17:34

>>250
Let's say we can determine the inverse
You can't it's not well defined as there are several values that map to 1. You have yet to form a subset that isn't countable though.

Name: Anonymous 2012-01-10 17:35

>>251
Again, pleasee shut up and let the adults talk you unemployed faggot.

Name: Anonymous 2012-01-10 17:35

Ok, I'll be nice. Let's say these 1s are independent. 1-subscript-0, 1-subscript-1 etc. And basically these 1s belong to the set Y, and f:X->Y. It has to be a  one-to-one correspondence if we consider these 1s independent, so the cardinality of Y is equal to X's. If X is countable, Y is countable. If X is uncountable, then Y is uncountable.

But what point are you getting at?

Name: Anonymous 2012-01-10 17:35

>>254
No please, enough with the ad-hominems, prove the statement wrong, you've stated that the statement is false, now show us why.

Name: Anonymous 2012-01-10 17:36

>>253
Well, isn't the inverse uncountable? I mean, I could have 7 {5}'s or 10,000,0000 {5}'s map to {1}.

Name: Anonymous 2012-01-10 17:37

>>245
the function f : {1,2,3,4,5,6,7,9,10} -> {1}; f({5}) = {1}; f({7}) = {1}; f({9}) = {1} is:
- Not well defined, because neither {5}, {7}, {9} are in {1,2,3,4,5,6,7,9,10}. It's a function from {{5},{7},{9}}.
- Not injective, since there exist an x and an y such that f(x) = f(y) and x != y.
- Not invertible, since it is not bijective (it is not injective).

Name: Anonymous 2012-01-10 17:38

Why is he trying to disprove something that is true?

http://en.wikipedia.org/wiki/Countable_set
Proposition: Any subset of a countable set is countable.
Proof: The restriction of an injective function to a subset of its domain is still injective.

Doesn't he know how mathematics work or something?

Name: Anonymous 2012-01-10 17:38

>>257
Since it's a surjective mapping, there is no inverse in the first place. You can't have 7 {5}s or 10,0000000 {5}'s... sets can't have duplicates.

Name: Anonymous 2012-01-10 17:39

"oops my bad, I had a brain fart". Is that hard to say?

Name: Anonymous 2012-01-10 17:39

>>257
No it's neither countable or uncountable, it's not defined at all. Let's say that it was, how is the function a subset of {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}?

Name: Anonymous 2012-01-10 17:40

>>261
It is when your English is as bad as Kodak's.

Name: Alpha Male !gD3Op2fhHs 2012-01-10 17:41

>>261
You have to understand, he's a little retarded piece of crap, in his little world he can't be wrong, even when he provably is.

Name: Anonymous 2012-01-10 17:41

>>252
Now that's a bijection!
let A be the set {Mary, Jenny, Kay}, and B the set {5,7,9}.
The bijective function f : A -> B is defined as:
f(Mary) = 5
f(Jenny) = 7
f(Kay) = 9

The inverse f-1 : B -> A is:
f-1(5) = Mary
f-1(7) = Jenny
f-1(9) = Kay


Happy now?

Name: Anonymous 2012-01-10 17:41

>>260
{{5}, {{5{,{5}}, {{5},{5},{5}}..}

Name: Anonymous 2012-01-10 17:42

>>264
You're still a huge fucking faggot.

Name: Anonymous 2012-01-10 17:42

why are certain people having trouble grasping elementary topology?

Name: Anonymous 2012-01-10 17:43

>>266
What is your point? That's not a subset of {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}.

Name: Anonymous 2012-01-10 17:43

>>265
So you still haven't told us if you're going to take the $10/hr tech support job or not.

Name: Anonymous 2012-01-10 17:44

>>270
I'm not, and you're still wrong.

Name: Anonymous 2012-01-10 17:45

C'mon kodak, is really that hard to say "all right I made a mistake"?

Name: Anonymous 2012-01-10 17:45

>>269
The numbers don't include anything above 10 nor anything below 1.

Name: Anonymous 2012-01-10 17:46

>>273
Excellent observation, and?

Name: Anonymous 2012-01-10 17:46

>>271
Well, given you're clearly too stupid to work as a computer programmer. Now again, shut up and just go "google stuff. Again, you don't have what it takes to write software for a living.

Name: Anonymous 2012-01-10 17:47

Kodak, the proof is in >>259. What do you have to say now?

Name: kodak_gallery_programmer !!kCq+A64Losi56ze 2012-01-10 17:47

>>274
You stand zero chance of getting hired by either Google or Facebook as a programmer.

Name: Anonymous 2012-01-10 17:47

>>275
I'm sorry, but it's you that's clearly googling stuff. And you're pretty bad at it too.

Name: Anonymous 2012-01-10 17:48

>>275
And you don't know how to do elementary mathematics apparently, what a shitty workplace you must have, how could a company ever settle for someone as retarded as you? I guess they're not relying on you, or perhaps they are, considering Kodak is going bankrupt.

Name: kodak_gallery_programmer !!kCq+A64Losi56ze 2012-01-10 17:48

>>278
Nope. Try again you unemployed idiot.

Name: Anonymous 2012-01-10 17:49

>>277
What about Kodak? I hear they have pretty low standards.

Name: kodak_gallery_programmer !!kCq+A64Losi56ze 2012-01-10 17:50

>>279
You're problem is that you don't understand what you just "googled".

Name: kodak_gallery_programmer !!kCq+A64Losi56ze 2012-01-10 17:51

>>281
Feel free to submit your resume. I promise you that they won't hire you for anything more than tech support.

Name: Anonymous 2012-01-10 17:51

>>280
It's not me that said that a function can be uncountable.

Name: Anonymous 2012-01-10 17:52

So Kodak modus operandi,
- make a false statement
- try to lie about it later
- when shown evidence that he's lying try to write some random bullshit strawman arguments
- get proven wrong
- ad-hominem attacks on the people who proved him wrong
- get faced with mathematical evidence that he's wrong
- ignore it
- claim that he's superior because he works at some shitty company who hires programmers without mathematical ability
- write some more random bullshit about undefined mathematics and pretend it's correct
- write some unrelated bullshit
- get told
And most importantly of all
- never admit to any mistake ever

Name: Anonymous 2012-01-10 17:52

Yes, and this is why we hate C++.

Name: Anonymous 2012-01-10 17:53

>>283
After what you've displayed of the talent there? No thanks, I'd rather not work with incompetent programmers.

Name: Anonymous 2012-01-10 17:53

>>285
Can we start ignoring him now?

Name: Anonymous 2012-01-10 17:54

>>285
I'm getting confused here. We have some computer science major with reading comprehension problems and some 17 year old that likes to 'lol.

Name: Anonymous 2012-01-10 17:54

>>286
this used to be a sepples is shit thread
then it took some math to the kodak

Name: Anonymous 2012-01-10 17:54

>>287
Well, no one wants to hire your dumbass for a programming job!

Name: >>170 2012-01-10 17:55

This has been your daily reminder that the subset of a countable set is countable, I hope you have enjoyed it.

Name: Anonymous 2012-01-10 17:55

>>290
8/10

Name: >>288 2012-01-10 17:56

>>292
I did, but let's ignore him now. Seriously.

Name: Anonymous 2012-01-10 17:56

Can you fucking drama, trip faggots go [i]back to /g/, please[i].

Name: Anonymous 2012-01-10 17:57

>>292
I did enjoy it, Kodak trying to do mathematics and failing miserably always lights up my day.

Name: >>294 2012-01-10 17:57

Now I'm going back to nambla.org.

Name: Anonymous 2012-01-10 17:58

>>296
Your mom giving me a blow job lights up my day.

Name: >>298 2012-01-10 17:59

Disregard that, I enjoy anal rape.

Name: Anonymous 2012-01-10 18:00

To be honest I think Kodak has some serious mental issues, since he can never admit that he's wrong he's probably suffering from Narcissistic personality disorder or something to that effect. I think you guys should leave him alone and stop making fun of him.

Name: Anonymous 2012-01-10 18:02

>>300
Well I'll be fucking damned

Symptoms include:
- Reacts to criticism with anger, shame, or humiliation
- Tends to exaggerate their own importance, achievements, and talents
- Imagines unrealistic fantasies of success, beauty, power, intelligence, or romance
- Requires constant attention and positive reinforcement from others
- Easily becomes jealous
- Is easily hurt and rejected

I'm going to leave him alone, I don't want Kodak to hurt himself or anything, I had no idea he was a mental patient.

Name: Anonymous 2012-01-10 18:03

>>301
2/10

Name: Anonymous 2012-01-10 18:04

>>301
Reacts to criticism with anger, shame, or humiliation
It's hard to tell over the internet, but I don't think that's what is going on. I think he's just so stupid, he doesn't even realize that he is being proved wrong. The second, third and fourth are spot on, though.

Name: Anonymous 2012-01-10 18:06

>>301
Welp, no more Kodak-kun-related fun for me either.

Name: Anonymous 2012-01-10 18:07

>>303
This is coming from a person that still can't hired as a computer programmer.

Name: Anonymous 2012-01-10 18:08

>>305
Hey kodak, sorry if I have said anything that might have hurt your feelings. I think you're great, and that you're a really good programmer.

Name: Anonymous 2012-01-10 18:08

>>303
I think the only possible future for you with computers is to take that $10.00/hr tech support job.

Name: kodak_gallery_programmer !!kCq+A64Losi56ze 2012-01-10 18:09

>>304
a)I heard it all before and
b)I didn't care the first time around.

Name: Anonymous 2012-01-10 18:09

>>305
And you still can't spoke English.

Name: Anonymous 2012-01-10 18:10

>>303
He was getting pretty emotional to our criticisms on his claim of uncountable subsets of countable sets, if you ask me.

Name: Anonymous 2012-01-10 18:11

>>308
We know, Kodak-kun, we know. You're a good guy.

Name: Anonymous 2012-01-10 18:11

EXAMINE MY DUBS

Name: Anonymous 2012-01-10 18:12

Guys, stop bothering him, it's not cool. As controversial as he is I don't want to see him hurt himself or anything.

Name: Anonymous 2012-01-10 18:12

>>309
Go google "How do I suck less at being a computer programmer".

Name: Anonymous 2012-01-10 18:16

>>313
If he's got NPD, he's not going to kill himself because some lowly creatures on an internet textboard think he's wrong.
Actually, it's the other way around, if we ignore him it will get bad for him. (assuming a closed environment where Kodak-kun's only social interaction is posting on /prog/, which is highly unlikely)

Name: Anonymous 2012-01-10 18:21

>>314
Do it yourself, I'm not Googling shit for you.

Name: Anonymous 2012-01-10 18:22

>>312
lol fag

Name: 316 2012-01-10 18:28

Name: Anonymous 2012-01-10 18:30

Name: Anonymous 2012-01-10 18:36

what the fuck
this is world4ch
no thread can get to 300 posts so quickly
cease posting immediately

Name: MEGA BUMP 2012-01-10 18:38

>>320
MEGA BUMP

Name: Anonymous 2012-01-10 18:42

>>321
The size of this thread has increased faster than your blowup penis.

Name: Anonymous 2012-01-10 18:47

>>320
I'm actually shocked this thread grew so quickly legitimately. I don't know if I like this. Someone spam this thread.

Name: Anonymous 2012-01-10 18:51

>>323

Agree. What the FLYING FUCK has happened here?! This is unbelievable.

Name: Anonymous 2012-01-10 18:52

So in these threads (amongst others) kodak has posted as matth@eecs.berkeley.edu: http://dis.4chan.org/read/prog/1324419483, http://dis.4chan.org/read/prog/1325107881, http://dis.4chan.org/read/prog/1324479655 and http://dis.4chan.org/read/prog/1322249677

Now if you do a little digging you'll find that the mail belongs to a certain Matthew Harren. I don't know if kodak knows this person or not but I'm not taking any chances, I'm going to write a concerned mail to this Matthew Harren, and to someone who knows Matthew Harren in case it's actually him, I'm also going to mail Kodak that I'm very concerned about one of their employees, that they might be suicidal and I'll include as many details as possible about him.

Don't worry kodak, you will be saved!

Name: Anonymous 2012-01-10 18:53

>>324
On the textboards people have long forgotten what a tripfag can do to a thread.

Name: Anonymous 2012-01-10 18:54

>>325
1/10

Name: Anonymous 2012-01-10 18:55

>>325
You seriously think some actually puts their own email in that field?

Name: Anonymous 2012-01-10 18:56

>>327,328
IHBT

Name: Anonymous 2012-01-10 18:59

>>325
According to http://www.cs.berkeley.edu/~necula/ this matthew harren graduated in 2007 and now works at Google. The interesting part of this is that one of the patents he has filed for Google had him listed as being from Fremont, CA, this is interesting because Kodak has said hella a couple of times, which is native to northern California.

Name: Anonymous 2012-01-10 19:00

>>328
I'm not sure, but why would he chose a random PhD student though? I'm going to assume that this person might know who Kodak is.

Name: Anonymous 2012-01-10 19:00

>>330
He also recently had a profile at mylife.com
http://www.google.no/search?gcx=c&ie=UTF-8&q=matthew+harren+CA

Name: Anonymous 2012-01-10 19:01

>>330
and now works at Google
>>277

Name: Anonymous 2012-01-10 19:02

>>330
No, I just said that I live in northern California. Believe it not, I'm a Wisconsin native.

Name: Anonymous 2012-01-10 19:05

>>330
Okay I'm mailing this Necula fellow to tell him that I'm very concerned that someone who might be Matthew Harren is mentally unstable and quite possibly suicidal.

Name: Anonymous 2012-01-10 19:05

>>330,331,332
Serisous detective work here.
Holy smokes /prog/
I didn't know batman visits this place.

Name: Anonymous 2012-01-10 19:07

>>336
What Kodak didn't realize is that my hourly job as a toilet scrubber allows me to build up some serious Google skills.

Name: Anonymous 2012-01-10 19:08

All right so I also have to mail Google about Matthew Harrens possible suicide risk.

Name: Anonymous 2012-01-10 19:09

Have you ladies finished trolling yet?

Name: Anonymous 2012-01-10 19:13

>>339
Don't act like this isn't more fun than a regular sepples is shit thread.

Name: Anonymous 2012-01-10 19:15

>>330
Kodak didn't say hella, it was Alpha Male.

Name: Anonymous 2012-01-10 19:15

Okay so I have written and sent two very concerned mails to both Necula and Google's Fremont branch about a poster that identifies himself as Matthew Harren that seems to have suffered from some sort of mental breakdown and might be at risk of harming himself. I'm going to wait sending mails to Kodak and Harren himself till I get some sort of feedback from Necula. I'm going to bed now and will post results in the morning.

Name: !!u6+71cp04po3aB8 2012-01-10 19:17

##911evanshall is matth@eeecs.berkeley.edu's tripcode.

Name: Anonymous 2012-01-10 19:18

>>341
In http://dis.4chan.org/read/prog/1326089963 kodak said it in post 159, he has also said it in http://dis.4chan.org/read/prog/1325088689 in post 67.

Name: Anonymous 2012-01-10 19:22

Name: Anonymous 2012-01-10 19:23

>>343
911 Evans Hall seems to be the office of a math professor at Berkeley.

Name: Anonymous 2012-01-10 19:26

>>346
Oh, the irony.

Name: Anonymous 2012-01-10 19:27

>>347
Haha yes, how ironic indeed.

Well, I'm really going to bed now, see you in the morning /prog/.

Name: Anonymous 2012-01-10 19:28

Good night, >>348.

Name: Anonymous 2012-01-10 19:40

The jews are after me.

Name: Anonymous 2012-01-10 20:26

So,
* matth@eecs.berkeley.edu!!8TAzbhVOfn9F0d0 seems to be kodak_gallery_programmer!!kCq+A64Losi56ze (Kodak-kun).
* Kodak-kun has several tripcodes: !!+smk517PP2af+Xn, !!kCq+A64Losi56ze, !!RUok9kNlfAMW6vT, !!V98H8hw9ydTWLgo, !!VIk1pgCZf9P/QBQ, !!1ILcdKBYf7nyXyy, !!M8okqD4wRfs+xmp = ##kodak, !!NOuIr5+Z3dDMZ1a.
* Kodak-kun may be related to the constant jews spam (like >>350, we know it's you, Kodak-kun) of early/half 2011.[9]
* Kodak-kun may be related to the constant autism spam of the second half of 2011.[10]
* matth@eecs.berkeley.edu's address belongs to Matthew Harren, which graduated in 2007,[1] and is from Fremont, CA. He works at Google.
* The tripcode !!8TAzbhVOfn9F0d0 is generated by ##911evanshall
* 911 Evans Hall is the office of a berkeley math professor, Alexandre J. Chorin.[2]
* Kodak-kun worked as a Java programmer for Kodak Gallery at Emeryville, CA,[3][4][5] and then for Yahoo as a web monkey.[5]
* From the information we've got from various threads, he worked at Kodak Gallery at least from 2011-05-30 to 2011-07-21.[3][5]
On 2011-08-16, he was working for Yahoo, in Sunnyvale.[6]
On 2012-01-01, he was working again for Kodak Gallery, at 1480 64th st, ste 300, Emeryville, CA. He was there at 15:23 /prog/ time.[8]

[1] http://www.cs.berkeley.edu/~necula/
[2] http://math.berkeley.edu/people/faculty/alexandre-j-chorin
[3] ``I work as a Java Programmer for Kodak Gallery here in Emeryville, California.''
~ http://dis.4chan.org/read/prog/1306772422/47
Name: Anonymous : 2011-05-30 19:45
[4] http://dis.4chan.org/read/prog/1307886348/43 Name: Anonymous : 2011-06-12 13:02
[5] http://dis.4chan.org/read/prog/1308801644/3 3 Name: Anonymous : 2011-06-23 00:57
[6] ``I now work as a web monkey at Yahoo in Sunnyvale, CA. Prior to that, I was a (Senior) Java Progammer at Kodak Gallery in Emeryville, CA.''
~ http://dis.4chan.org/read/prog/1313506093/4
Name: !!kCq+A64Losi56ze : 2011-08-16 12:28
[7] http://dis.4chan.org/read/prog/1311055364/56 Name: Anonymous : 2011-07-21 15:58
[8] http://dis.4chan.org/read/prog/1325441698/3 32 Name: Anonymous : 2012-01-01 15:23
[9] http://dis.4chan.org/read/prog/1306709096/6 Name: !!kCq+A64Losi56ze : 2011-06-09 16:10
[10] http://dis.4chan.org/read/prog/1307652584/3 Name: !!kCq+A64Losi56ze : 2011-06-09 16:59

Name: Anonymous 2012-01-10 20:27

I've got bored of searching more about him, so that's it for today.

Name: Anonymous 2012-01-10 20:52

>>351
Penis envy will get you nowhere.

Name: Anonymous 2012-01-10 23:12

>>351
I brought the "Jews are after me" spam here after a misadventure in the now deceased /new/. Wasn't kodak.

Name: Anonymous 2012-01-11 0:55

>>351
[8] http://dis.4chan.org/read/prog/1325441698/3 32 Name: Anonymous : 2012-01-01 15:23

That can't be kodak-san, he would never break the standard and use reserved names like that.


Also lol @ java programmer that spams /prog/ acting like a super elitist.

Name: Anonymous 2012-01-11 1:33

>>351
I work Kodak Gallery on Hollis Street here in emeryville.
http://dis.4chan.org/read/prog/1311055364/56

http://www.kodakgallery.com/gallery/footerLinksContent.jsp?pageID=600002
The Gallery Headquarters

Kodak Imaging Network
1480 64th St., Suite 300
Emeryville, CA 94608
510-229-1200

There's no Kodak Gallery on Hollis Street

dis.4chan.org/read/prog/1307886348/43
I'll be up in my cubicle at Kodak Gallery in Emeryville, CA
Senior Software Engineer only gets a cubicle?


The best part is that he never posts what floor he's on and he expects you to be able to walk in and write right up to him somehow. I'm also sure kodak has security as well to restrict random people from walking right into workspace and thus even if you knew the floor he was on you'd never make it to him and thus you will never find kodak-san.

Unless he posts a badge or something unique to that employer then he's full of shit. Probably some 20 year old drop out jelly of nearby Berkeley grads that do cirlces around his java shit.

Name: Anonymous 2012-01-11 5:22

So there is no good language to code in for such purposes.
C is obsolete. C++ is shit. C# is retarded.
Thanks /prog/, now I need to pick a new career.

Name: Anonymous 2012-01-11 5:23

So there is no good language to code in for such purposes.
C is obsolete. C++ is shit. C# is retarded.
Thanks /prog/, now I need to pick a new career.

Name: Anonymous 2012-01-11 5:23

So there is no good language to code in for such purposes.
C is obsolete. C++ is shit. C# is retarded.
Thanks /prog/, now I need to pick a new career.

Name: Anonymous 2012-01-11 6:00

new career suggestion: "toilet scrubber"

Name: VIPPER 2012-01-11 6:06

What the hell is this!

Name: Anonymous 2012-01-11 6:38

I have observed that most C++ haters hate it because they are incompetent programmers.

Most of the competent haters are LIPTH faggots, or C dinosaurs.

Name: Tyrannosaurus-Rex 2012-01-11 7:03

>>362
I'm going to eat you, just you wait.

Name: Anonymous 2012-01-11 7:25

______________________
< what did he call us? >
 ----------------------
\                             .       .
 \                           / `.   .' "
  \                  .---.  <    > <    >  .---.
   \                 |    \  \ - ~ ~ - /  /    |
         _____          ..-~             ~-..-~
        |     |   \~~~\.'                    `./~~~/
       ---------   \__/                        \__/
      .'  O    \     /               /       \  "
     (_____,    `._.'               |         }  \/~~~/
      `----.          /       }     |        /    \__/
            `-.      |       /      |       /      `. ,~~|
                ~-.__|      /_ - ~ ^|      /- _      `..-'  
                     |     /        |     /     ~-.     `-. _  _  _
                     |_____|        |_____|         ~ - . _ _ _ _ _>

Name: Anonymous 2012-01-11 8:27

>>364
I rawr'ed.

Name: Anonymous 2012-01-11 9:58

Name: Anonymous 2012-01-11 10:31

What is it about C++'s syntax that people hate so much?

Name: Anonymous 2012-01-11 10:35

>>367
3/10
What syntax? I can overload almost every operator! Fuck your syntax!

Name: Anonymous 2012-01-11 10:51

>>367
That's what you have a problem with? Provided you follow conventions, I don't see what the issue is.

Name: Anonymous 2012-01-11 11:28

What is convention in a language that uses bitshift operators for IO in the base language? Should "string" << 3.0f be a concatenation per convention? It would seem to be the behavior that would satisfy the principle of least surprise best, cout << "string" << 3.0f prints the string and number in succession after all... By extension 3 << 2 really should result in "32"?

Name: Anonymous 2012-01-11 11:53

Operators in C++ can be overloaded, which means that the "<<" operator is not the bitshift operator in every case, for the same reason the "+" operator can mean "concatenation" in some cases. Curiously, people go apeshit about "bitshifting" file objects but they don't speak a word about "summing" strings.

Whether overloading operators is good, it is a matter of personal opinion. The fact is that C++ is not the only language which implements it (Python also does, IIRC), but C++ has surely acquired some permanent critical target status due to no apparent reason than mere butthurtism.

The choice of the "<<" and ">>" operators for I/O have a rationale (which the committee has released, but probably no one has ever read it). One good reason for using (or abusing) operators is that it becomes easier to chain I/O calls:


std::cout << "Hello, " << "World!" << std::endl;


instead of something like:


std::cout.write("Hello, ");
std::cout.write("World!");
std::cout.write(std::endl);


which verticalizes the code too much. One could vouch for:


std::cout.write("Hello, ").write("World!").write(std::endl);


but, besides it being yet more verbose, it's less intuitive (in my opinion) than to use any sort of operator, which is expected to be used in associative contexts.

It's a matter of taste. I don't think choosing operators for this task are an spectacular design choice, but I don't see many problems with them, either. One thing I think is very bad are the "manipulators" (std::hex and such). These are indeed very bad design choices in my opinion.

Just remember: when blindly criticizing C++ operators, take a look around. Look at Haskell operators, for example. Be amused for a while. You'll see that the world is much more dark and horrible than what mommy has told you, yet C++ inherits all the debt.

Name: Anonymous 2012-01-11 12:13

>>370
What if x << y << z = (x << y) << z) and (x << y) << z != x << (y << z)? After all, << is not commutative either.

Name: Anonymous 2012-01-11 12:27

>>371
Why didn't they just invent another operator?

Name: Anonymous 2012-01-11 12:37

>>371
Pick one:
std::cout.write("Hello, ").write("World!").write(std::endl);
std::cout.write("Hello, ").writeln("World!");
std::cout.write("Hello, ", "World!", std::endl);
std::cout.writeln(Hello, ", "World!");

Name: Anonymous 2012-01-11 12:38

>>373

This is a good point. I'm sure the committee has thought on that possibility. My guess is that they would not change the core language because of a library issue. After all, how would syntactically be this operator? What would be its meaning outside an I/O context?

Name: Anonymous 2012-01-11 12:49

>>371
I work with some ex Oracle weenie who thinks overloading operators in C++ is the greatest thing since control top pantyhose.

Name: Anonymous 2012-01-11 12:51

>>371
Just remember: when blindly criticizing C++ operators, take a look around. Look at Haskell operators, for example.
Haskell operators work, unlike C++'s. They don't need to be associated with a class, and they don't need friends to write cout << "Hax" << " my " << "anus";.
That's because they're simply variables, they're not supposed to be a -> b -> c functions, for some a, b, c.
(<<) :: Handle -> [Char] -> IO ()
(<<) = hPutStrLn
cout = stdout
endl = "\n"
main = cout << ("Hax" ++ " my " ++ "anus" ++ endl)

Name: Anonymous 2012-01-11 13:27

>>370
"cout << "string" << 3.0f" doesn't concatenate anything, though. It's called the insertion operator for a reason. It writes, or "inserts", "string" to the stream, which returns the cout instance, so then you can write 3.0f to the stream.

Name: Anonymous 2012-01-11 13:34

>>377
C++ operators don't need to be associated with a class, and they don't need to be friends. They're normal functions, which respect the normal access control for members, as any function would.

I don't see why C++ operators "don't work", put apart what the average emotionally-based, highly subjective opinion against them claims.

Wondered what the fuck is a << operator in C++? Now wonder what the fuck a ++ or a >@> in Haskell is. That's the point.

Name: Anonymous 2012-01-11 13:45

>>379
I hope you get to work with someone who exchanges >> and << in classes you need to use or that the ostream operator is uses ().

Name: Anonymous 2012-01-11 14:00

>>380
Conventions, conventions, conventions. Any decent team will establish them, although you'd think that it would go without saying, considering that << is the insertion operator and should only be used for inserting, >> is the extraction operator and should only be used for extracting, and () is for function objects. There's no need to put a restriction on operators. It's not the same as weak typing, where the lack of restrictions can lead to errors even if you're trying to be sensible.

Name: Anonymous 2012-01-11 14:07

>>380

I hope you get to understand that someone who exchanges >> and << is mind-crippled and C++ is not designed to fix bugs buried deep inside the human brain.

Name: Anonymous 2012-01-11 14:08

>>379
C++ operators don't need to be associated with a class,
Can I write template<typename A, typename B> int operator+(A x, B y) { return 0; }?
This is a serious question, I don't know.

Now wonder what the fuck a ++ or a >@> in Haskell is. That's the point. That's the point.
I might as well wonder what the fuck is a vasnprintf or strtok. That's not the point.
Let me clarify one thing, I'm not one of those retards that think of cout << "something" as a bitshift to a file. I'm one of those retards that think that C++ operator overloading is an ugly hack.

And you still need friends to make cout << "something" and cout << 12 work.

Name: Anonymous 2012-01-11 14:15

>>383
Yes, operator functions can be free functions.

You don't need friends, since you don't need to access it.

Name: Anonymous 2012-01-11 14:18

>>382
Wouldn't it be wonderful to have a language that automagically discards that mind-cripple as the mind-cripple it actually is instead of compiling? I must be dreaming, there cannot be in any way such a language.

Name: Anonymous 2012-01-11 14:18

I meant you don't need to access its members, sorry.

Also, how is operator overloading an ugly hack?

Name: Anonymous 2012-01-11 14:19

>>383
vasnprintf doesn't exist as it wouldn't offer any extended functionality over vsnprintf.

strtok is just what it says it is, it extracts tokens from strings.

Name: Anonymous 2012-01-11 14:21

i always hated how C functions would write to a global static buffer.

just throwing that out there

Name: Anonymous 2012-01-11 14:36

>>383

Yes, you can write them as free function, and as templates as well.

Why do you think it is an ugly hack? Operators are simply member methods or free functions. If one can overload methods and functions, why can't them overload these operators?

Being able to overload them does not mean you must overload them in every situation. But there are many legitimate uses. Think, for example, if you had a class to represent a mathematical vector. You could, for example, overload operator * in order to make it work as a vectorial multiplication, and as a multiplication with a scalar. The correct one would be used depending on the context. In the end it's just syntactical sugar, really.

Again, you don't need friend for operating with cin, cout or any other class. You only need them if you need to access any private members. If you do, then you're either violating encapsulation (revealing an object's state) or actively developing an internal/library function (which inspects the object's state nevertheless).


#include <iostream>

class C {
public:
    C(int x = 0): x(x) {}

    int getX() const { return x; }

private:
    int x;
};

std::ostream &operator <<(std::ostream &stream, const C &c) {
    stream << c.getX();
    // If c.x was accessed directly, 'friend' would be needed.
    return stream;
}

int main(void) {
    C c(10);
    std::cout << c << std::endl;
}


friend declarations semantically bind the involved classes/functions into a "package" visibility (similar to Java). They're not intended to be used indiscriminately. They're intended to be used within the same library/package to give related (but otherwise different) classes another channel of communication, yet avoiding this channel to be exposed to the public.

The class should always expose in its public interface everything necessary to operate it, so that friend is not needed outside the package or library. This is not specific to C++, it's common OOP stuff.

>>385

How can the language determine what is and what is not a mind-crippled design?

If you ever find a solution for that, please share. (Really.)

Either way, it is not easy, nor the purpose of C++ or any language that I know, to prohibit the programmer of doing stupid things.

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