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

Pages: 1-4041-

C or C++

Name: Anonymous 2011-07-14 11:01

Best choice for a beginner?

Name: Anonymous 2011-07-14 11:48

  C 

Name: Anonymous 2011-07-14 12:34

SEPPLECOCKS

Name: Anonymous 2011-07-14 14:08

Start with C, then learn C++

Name: Anonymous 2011-07-14 14:23

Start with Prolog, then learn Smalltalk.

Name: Anonymous 2011-07-14 14:26

Start with HTML, then learn BBCode

Name: Anonymous 2011-07-14 17:06

Start with FORTRAN, then learn COBOL.

Name: Anonymous 2011-07-14 17:07

Start with Prolog, then learn Smalltalk, then learn Lisp, then learn Forth, then learn Coq.

Name: Anonymous 2011-07-14 17:08

Start with Lisp, then write C in Lisp, then learn that

Name: Anonymous 2011-07-14 17:19

>>9
Start with Lisp, then become a male prostitute.

Name: Anonymous 2011-07-14 17:56

>>10
Since most male prostitutes are of the gay variety, this raises an important question, which will form the basis for our next exercise:



  Exercise 2.1
    Does using Lisp make the person gay, or do you have
    to be gay in order to use Lisp? Answer the question
    using nothing but Adobe Photoshop, a picture of Paul Graham
    and the inductive property of ℕ.

Name: Anonymous 2011-07-14 19:56

>>11
Leah Culver probably fucked with Paul Graham.

Name: Anonymous 2011-07-14 20:28

Start with C. Never learn C++; it is brain-poison. Study language implementations in C, and try writing your own Scheme or Smalltalk interpreter.

Name: Anonymous 2011-07-14 20:29

snape kills dumbledore

Name: Anonymous 2011-07-14 22:49

MSDOS QBASIC

Name: steps to becoming EXPERT 2011-07-14 23:48

According to Zhivago:
http://www.reddit.com/r/programming/comments/bmt01/to_prove_an_old_stuffy_computer_science_professor/c0nyk3k

Start with ECMAscript.
Implement a simple microcontroller emulator in it.
Write an assembler.
Implement a simple Forth in Assembly.
Implement a simple Lisp in Assembly.
Implement a simple Prolog in the simple Lisp.
Implement a simple Smalltalk.
Implement a Meta-Object Protocol in the simple Lisp.
Implement a Linda Tuple machine.
That would be an interesting course and would cover all of the foundations of programming.
Unfortunately 90% of your students would complain that it involved wasting all of your time learning non-factory work-skills, and would want you to teach all of the material in something useful like Java.

Name: Anonymous 2011-07-14 23:49

C

Name: Anonymous 2011-07-14 23:55

I'm not the OP, but what is the major difference between C and C++? I don't know a lot about programming. What can't I do in C that I can in C++, or vise versa?

Name: Anonymous 2011-07-15 0:08

>>18
C++ is just C with classes and a few other features. Some people think of C++ as object oriented C but C is already object oriented. C can do just about anything C++ can do, except perhaps multiple inheritance, but that's something that no language has ever gotten right and is therefore best to stay away from.

Name: Anonymous 2011-07-15 0:18

>>19
Do you need classes? I haven't gotten to classes in my python book yet.

Name: Anonymous 2011-07-15 0:27

>>16
That would be lots of fun.

Name: Anonymous 2011-07-15 0:33

>>19

C++ has vtables. Multiple or no, this is something C does not have. (you have to make one yourself)

Also templates.

also lots of languages have done multiple inheritance well. choke on it.

Name: Anonymous 2011-07-15 7:49

OP here, I think I'll start with HASKAL.

Name: Anonymous 2011-07-15 9:05

read k&r and never return to this place if u dont want to be for the rest of u live a unemployed BBC expert

Name: Anonymous 2011-07-15 11:00

>>19
Umm, templates are a bigger feature IMO than classes in C++. Seasoned C++ programmers prefer using templates and class composition over that of class inheritance.

The C preprocessor is no replacement (even the C1x preprocessor which has a limited form of preprocessor-time polymorphism).

Name: Anonymous 2011-07-15 11:03

>>16
back to /proggit/

Name: Anonymous 2011-07-15 13:52

>>25
means of branching logic:
C: if, switch
C++: if, switch (not used so much), vtables

pretty basic difference I think.

Name: Anonymous 2011-07-15 14:04

>>27
switch is used plenty in C++ code for small fixed enumerations and what not that aren't extension points in your software, where you know things aren't going to change too much. switch statements are often faster than vtables, due to no call overhead, jump tables, and less cache thrashing. vtables are for where you anticipate needing to change or add new functionality. vtables have call overhead and less cache performance.

Anyone saying that you shouldn't use switch in C++, and instead use a polymorphic class hierarchal for everything is misguided. The true professional knows when and where to use switches and vtables.

Name: Anonymous 2011-07-15 16:12

The true professional knows when and where to use switches and vtables.

a lot of guys say "always" and "never" respectively. For instance, everyone who writes operating system kernels.

Name: Anonymous 2011-07-15 16:14

>>29
A lot of guys say (and are) ``true professionals'' too.

Name: Anonymous 2011-07-15 16:19

>>29
operating system kernels are trivial enterprise bullshit, not truly complex game engines.

Name: Anonymous 2011-07-15 16:38

C++ duplicates features of C. The duplicated features have to be used together. The duplicated features are mostly inferior to the C features that they replace.

Name: Anonymous 2011-07-15 17:13

>>31
Someone needs to seize operating system kernels by the throat and drag them to their apex.

Name: Anonymous 2011-07-15 19:49

>>32
why hello there yossi kreinin, why dont you get the FUCK OUT OF HERE

Name: Anonymous 2011-07-20 4:04

>>16
What is  a "Linda Tuple Machine"?

The Googles, they do nothing!!

Name: Anonymous 2011-07-20 4:06

Name: Anonymous 2011-07-20 4:44

>>36
and is named for Linda Lovelace, an actress in the porn movie Deep Throat, a pun on Ada's tribute to Ada Lovelace.
Well, wow.

Name: Anonymous 2011-07-20 4:45

>>36
thanks

Name: can i have some privacy here 2011-07-20 4:59

go away!

Name: Anonymous 2011-07-20 5:43

>>16
Is this (zhivago) actually the same person as in Freenode's ##C ?

Name: Anonymous 2011-07-20 5:57

>>40
Yes.  Just follow his Reddit comments ;)

Name: Anonymous 2011-07-20 6:32

>>29
The true professional knows when and where to use switches and vtables.
a lot of guys say "always" and "never" respectively. For instance, everyone who writes operating system kernels.
You have never seen any OS kernel. In particular, you have not seen Linux networking code.

Name: Anonymous 2011-07-20 8:33

Bask exultation skylight Krishna anatomy Leighton? Deform grim remorse scalar celerity amount!

Name: Anonymous 2011-07-20 8:59

Typhus whisper incur adsorb hypothalamic immersion Burtt crosspoint Percival deviate.

Name: Anonymous 2011-07-20 9:00

Turnip cyclorama relay impregnate Hoboken triton.

Name: Anonymous 2011-07-20 9:16

>>10
Brasilia gunplay Cynthia prick spavin incredulity puffy vis impious. Tor fanfold kerry Hubbard hypotenuse Patton Purdue gamma.

Name: Anonymous 2011-07-20 9:32

switch > if

compare


if (a < b) {
    doSomething();
} else {
    doSomethingElse();
}


vs


switch (a < b) {
case 1:
    doSomething();
    break;
case 0:
    doSomethingElse();
}

Name: Anonymous 2011-07-20 9:40

>>47
(a < b ? doSomething : doSomethingElse)();

Name: Anonymous 2011-07-20 9:50

>>47
(a<b)[f]()

Name: Anonymous 2011-07-20 11:14

>>49
Don't forget your ugly preparation which you can't use when you work with inferior people because only 1 out of 10 C programmers knows what this means:

void(*f[2])(void) = { doSomething, doSomethingElse };

Name: Anonymous 2011-07-20 11:16

>>50
http://cdecl.org/
Ergo your a fag.

Name: Anonymous 2011-07-20 13:18

>>51
C is so much more readable than LISP

Name: Anonymous 2011-07-20 15:03

>>25
Seasoned C++ programmers prefer using templates and class composition over that of class inheritance.

Maybe this is because these people don't want to deal with inheriting unnecessary methods.

Name: Anonymous 2011-07-20 15:59

Name: Anonymous 2011-07-20 16:26

>>54
Back to reddit please!

Name: Anonymous 2011-07-20 17:10

>>54
I can't believe this piece of trash has 912 upvotes in /r/programming/ right now.  What a retarded community.

HYUK HYUK AH NEVER SEEN THAT BEFORE

Name: Anonymous 2011-07-20 17:11

Bauhaus politic. Faulty generate Kirchner drumhead infest pegging drone roundtable. Damon junction Brandon carp margarine celesta EDT.

Name: Anonymous 2011-07-20 17:22

Meadowsweet Josephson record canister chimeric trickery sectoral vindicate.

Name: Anonymous 2011-07-20 17:27

Around uncouth ferromagnet?

Name: Anonymous 2011-07-20 17:29

>>56
Its funny.

Name: Anonymous 2011-07-20 17:34

Picasso. Phycomycetes blat glossy particle intercept seraglio Matthews corpulent introduce coal...

Name: Anonymous 2011-10-23 17:01

>>16
Zhivago is the most informative person ever. There is nothing Zhivago cannot explain.
            o                                            
                 O       /`-.__                          
                        /  \.'^|                         
           o           T    l  *                         
                      _|-..-|_                           
               O    (^ '----' `)     I HELP THE MENTALLY RETARDED PEOPLE
                     `\-....-/^      BECOME LESS STUPID WITH ZHIVAGO!
           O       o  ) "/ " (      /                    
                     _( (-)  )_                          
                 O  /\ )    (  /\                        
                   /  \(    ) |  \                       
               o  o    \)  ( /    \                      
                 /     |(  )|      \                     
                /    o \ \( /       \                    
          __.--'   O    \_ /   .._   \                   
         //|)\      ,   (_)   /(((\^)'\                  
            |       | O         )  `  |                  
            |      / o___      /      /                  
           /  _.-''^^__O_^^''-._     /                   
         .'  /  -''^^    ^^''-  \--'^                    
       .'   .`.  `'''----'''^  .`. \                     
     .'    /   `'--..____..--'^   \ \                    
    /  _.-/                        \ \                   
.::'_/^   |                        |  `.                 
       .-'|                        |    `-.              
 _.--'`   \                        /       `-.           
/          \                      /           `-._       
`'---..__   `.                  .`_.._   __       \      
         ``'''`.              .'##C   `'^  `''---'^      
                `-..______..-'

Name: Anonymous 2011-10-23 17:18

the best way to write c++ is to write C, grow your own data structures and use as few C++ features as humanly possible.


evidence: this is how the jvm was written and it is one of the most sophisticated and well built pieces of software ever.

Name: kodak_gallery_programmer !!kCq+A64Losi56ze 2011-10-23 17:35

>>63
evidence: this is how the jvm was written and it is one of the most sophisticated and well built pieces of software ever

Not really. The JVM breaks the security on certain I/O intensive applications, the locking system in anemic, and the handling of generics sucks dick.

Name: kodak_gallery_programmer !!kCq+A64Losi56ze 2011-10-23 17:38

>>63
The JVM also carries out a lot of redundant operations because it's too stupid to... never mind.... You ain't a programmer.

Name: Anonymous 2011-10-23 21:59

who the fuck would say that C++ is better for beginners than C

Name: Anonymous 2011-10-23 23:27

>>62
I put on my wizard robe and hat...

Name: Anonymous 2011-10-24 13:14

>>63
evidence: this is how Unix was written and it is one of the most sophisticated and well built pieces of software ever.

fify

Name: Anonymous 2011-10-24 13:44

>>64-65
So you can say something reasonable sometimes.

>>68
Yes, no.

Name: 2012-01-25 23:00

Name: Anonymous 2012-01-31 21:39

The best choice for a beginner:
http://www.bailopan.net/blog/?p=648

Name: Anonymous 2012-01-31 21:39

>>71
lol

Name: Anonymous 2012-02-01 14:14

>>13
Good on you for stating reasons. Oh wait.

>>19
Evidently you don't know C++, or C for that matter.

Name: Anonymous 2012-02-01 14:39

>>1
Start with C, then learn C++.

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