To print higher-resolution math symbols, click the
Hi-Res Fonts for Printing button on the jsMath control panel.

jsMath



Posting mode: Reply
[Return]
Name
E-mail
Subject
Comment
Verification
Get a new challenge Get an audio challengeGet a visual challenge Help
File
Password(Password used for file deletion)
  • Supported file types are: GIF, JPG, PNG
  • Maximum file size allowed is 3072 KB.
  • Images greater than 250x250 pixels will be thumbnailed.
  • Read the rules and FAQ before posting.
  • Use TeX/jsMath with the [math] (inline) and [eqn] (block) tags. Double-click equations to view the source.
  • このサイトについて - 翻訳


  • File : 1309472009.jpg-(76 KB, 260x343, Kr_c_prog_lang.jpg)
    76 KB Anonymous 06/30/11(Thu)18:13 No.3312033  
    Why is C so fucking elegant /sci/?
    The other day I was writing some code in C++ and gagged a little.

    Why isn't everything written in pure simple C?
    >> Anonymous 06/30/11(Thu)18:15 No.3312043
    Because jews
    >> Anonymous 06/30/11(Thu)18:16 No.3312045
    I think C++ is pretty damn elegant as well. C has this rustic feel to it - so simple is the language that you can't help but feel satisfied with the power you have to express problems so succinctly. C++ only adds IMO, not detracts.
    >> Anonymous 06/30/11(Thu)18:16 No.3312048
    Change is expensive.
    >> Anonymous 06/30/11(Thu)18:17 No.3312050
    Because it's minimalistic.
    Also, this isn't the fucking programming board. Get it through your skull
    >> Anonymous 06/30/11(Thu)18:19 No.3312059
    >>3312045
    But also to answer the question, development has lent itself well to object oriented models when abstraction and re-usability are key (almost always). Sometimes trying to implement something similar in straight C leads to a less than elegant implementation, and it probably more difficult to maintain. (Think C OO hacks)
    >> Anonymous 06/30/11(Thu)18:36 No.3312158
    >>3312050
    But the minimalism is what makes it so elegant. Everything in the language fits so well together with the software and hardware aspect (think pointers).
    C++ just feels like a patchwork job. Every other language is needlessly complicated (think java).
    >> Anonymous 06/30/11(Thu)18:37 No.3312164
    No class lol
    >> Anonymous 06/30/11(Thu)18:39 No.3312172
    >>3312059
    But well written C code is almost always easier to read and decipher in my opinion. The lack of operator overloading (why?), objects, templates and other unnecessary bs is godsend when trying to read code, especially code that you haven't written yourself.
    >> Colonel Coffee Mug !phJ7yIcs.Q 06/30/11(Thu)18:40 No.3312181
    A language can't possibly be good if it takes ten years and a compiler re-write to add something as simple as Object-Orientation.
    >> Anonymous 06/30/11(Thu)18:42 No.3312200
    >>3312172
    I agree. Writting elegant and modern C++ often require more effort to read and understand (ie: look at the complexity but sexyness of libBoost) and/or libraries to install.
    >> Anonymous 06/30/11(Thu)23:06 No.3313433
    >>3312181
    What?
    >> Colonel Coffee Mug !phJ7yIcs.Q 06/30/11(Thu)23:08 No.3313440
    >>3313433

    It took quite a bit of time to make C++ after C. Not saying it's inherently superior, but an addition of a feature like object orientation shouldn't take much more than a single header file with some function definitions.
    >> Anonymous 06/30/11(Thu)23:28 No.3313506
    > C
    > More elegant than C++
    What the fuck. What. The. Fuck. What the fuck-fucking fuck. I... Don't even.
    >> Anonymous 06/30/11(Thu)23:31 No.3313518
    >>3313506
    Explain.
    >> Anonymous 06/30/11(Thu)23:36 No.3313531
    C is shaped for <==3
    >> ႼЋïŁႣƧტƿḩЄƦṥ !Scone2booQ 06/30/11(Thu)23:39 No.3313543
    >>3312172
    A powerful language like C++ can be powerfully abused. That doesn't mean it's a bad language. Good coders write code to be read. If you want a language that can be read even when you have mediocre coders, that's the beauty of Java.
    >> Anonymous 06/30/11(Thu)23:42 No.3313551
    >>3313543
    >If you want a language that can be read even when you have mediocre coders, that's the beauty of Java.
    No, sloppy and badly styled code is unreadable no matter what language it's in.
    >> Anonymous 06/30/11(Thu)23:43 No.3313556
    > c
    > c++
    > elegant
    oh wow

    A Guide to Undefined Behavior in C and C++
    http://blog.regehr.org/archives/213

    If you don't understand how shitty these languages are, you don't know shit about programming.
    >> Anonymous 06/30/11(Thu)23:43 No.3313558
    >>3313543
    >mediocre coder
    >> Anonymous 06/30/11(Thu)23:44 No.3313559
    >>3313556
    >blaming personal incompetence on the language
    >> Anonymous 06/30/11(Thu)23:44 No.3313562
    >>3313543
    > read
    > C++
    It's funny, because every time I review C++ code all I can wonder is, "Wait, was memory management a *goal* of this project?" Because... it wasn't.
    >> Anonymous 06/30/11(Thu)23:46 No.3313566
    >>3313559
    derp much?
    >> Anonymous 06/30/11(Thu)23:48 No.3313575
    >>3313556
    What other language provides such an elegant trade off to crossplatformness efficiency and readability? None.

    I guess it depends on what you think is elegant though. To me, the most beautiful language provides the easiest and most direct way to interface the operating system without trading off readability (think assembly) and keeping the bloat to a minimum.
    >> Anonymous 06/30/11(Thu)23:49 No.3313576
    >>3313575
    Yeah, I agree, but lisp machines didn't take off. I imagine they will make a comeback, though.
    >> Anonymous 06/30/11(Thu)23:52 No.3313588
    Everyone should just use Ada, it's c/c++ with type and memory safety. Also, more human-readable syntax.
    >> Anonymous 06/30/11(Thu)23:53 No.3313590
    Everyone should just leave programming to the Indians.
    >> Anonymous 06/30/11(Thu)23:53 No.3313591
    >>3313575
    Seriously, man. Read the link. I use C all the time, I have no real beef with it overall, but if reading that series doesn't wake you the fuck up, I'd be very surprised.
    >> Anonymous 06/30/11(Thu)23:57 No.3313601
    >>3312059
    > implying C++ isn't a gigantic OO hack
    >> Anonymous 06/30/11(Thu)23:57 No.3313602
    They each have their advantages.

    C is not a good language for group projects or reusable code. C is good for high performance and maximum control.
    >> Anonymous 06/30/11(Thu)23:59 No.3313609
    >>3312033
    >Why is C so fucking elegant /sci/?
    It isn't. It's nice and minimalist and good at it what it does but it has a few warts here and there and it's obviously a product of its time. See how overloaded the 'static' keyword is. Also the 'register' keyword.
    >> Anonymous 07/01/11(Fri)00:00 No.3313614
    >>3313609
    Good luck managing strings or textual data in any complex way without breaking your brain.
    Oh, what's that? strcpy? ENJOY YOUR BUFFER OVERFLOWS AND GETTING OWNED BY EVERY TWO-BIT SKID LULZSEC IRC BASEMENT DWELLER, FAGGOT
    >> Anonymous 07/01/11(Fri)00:02 No.3313620
         File1309492932.jpg-(88 KB, 750x563, 1278839291586.jpg)
    88 KB
    >>3313556
    >people bitching about C and C++ because they're not interpreted

    oh u
    >> Anonymous 07/01/11(Fri)00:04 No.3313625
    you can't compare the two, they're two completely different types of languages. Cpp is object oriented, while C is procedural.
    >> Anonymous 07/01/11(Fri)00:09 No.3313651
    >>3312033
    I first learned c++ and hated it... I then decided to learn c and was dreading it... I bought the book C Programming a Modern Approach and finished it in 2 days.... Fucking love C
    >> Anonymous 07/01/11(Fri)00:09 No.3313652
    >>3313602
    > C is good for high performance
    Only if you understand the cost of this performance is massive in terms of reliability and stability. It isn't like C is magically faster than other languages. It's just unsafe.
    > and maximum control.
    Control of what?

    >>3313614
    > Good luck managing strings or textual data in any complex way without breaking your brain.
    I process strings in languages with built-in string types. You know, perl, python, lisp, ruby, java, lua... basically every decent language and a few indecent ones.
    >> Anonymous 07/01/11(Fri)00:12 No.3313670
    I like python.
    >> Anonymous 07/01/11(Fri)00:14 No.3313684
    >>3313667
    I'm sorry, did I give you the impression the C shouldn't be used? If so, I can only blame myself. Let me state it clearly, then.

    There is currently no viable substitute for C.

    Hopefully this changes in the future.
    >> Anonymous 07/01/11(Fri)00:15 No.3313691
    >>3313684
    >doesn't know about Java
    >> Anonymous 07/01/11(Fri)00:15 No.3313697
    >>3313652

    >Only if you understand the cost of this performance is massive in terms of reliability and stability. It isn't like C is magically faster than other languages. It's just unsafe.
    >Control of what?

    Well, I'm assuming that we are talking about experienced programmers. C isn't unstable and unreliable IF you know what you are doing.

    I do agree though that the syntax is awful, and, thus, the language is not a good language for group projects.

    No, it's not magic. There is a reason why C is faster than other languages like Java......

    Control of the machine code. C is barely one step above assembly language. Newer languages automatically generate gobs of unnecessary machine code if the programmer is not careful.
    >> Anonymous 07/01/11(Fri)00:16 No.3313702
    >>3313651
    This is great to hear. I always tell people when learning C++, "Please, if you get to the point that you think programming is stupid and irritating, understand it isn't the task, it is C++." Always try at least two languages, especially if one of them is C++.
    >> Anonymous 07/01/11(Fri)00:18 No.3313726
    >>3313697
    > There is a reason why C is faster than other languages like Java...... Control of the machine code.
    That has nothing to do with it. Absolutely nothing. C is fast because it trades off safety for convention. (C++ shares this "feature".) There is no reason at all you couldn't write a scheme to assembly compiler. Lisp was written before C even existed.

    C is fast because it crosses its fingers you didn't fuck up. It sure as hell isn't going to check for you.
    >> Anonymous 07/01/11(Fri)00:20 No.3313732
    >>3313685
    Name 10 commercial games in java and no cell phone games don't count niglet. Good luck getting java games to run on any game console.

    Good luck getting openGL completely recoded in something else.
    >> Anonymous 07/01/11(Fri)00:20 No.3313733
    >>3313726
    > scheme to assembly
    http://scheme2006.cs.uchicago.edu/11-ghuloum.pdf
    >> Anonymous 07/01/11(Fri)00:20 No.3313735
    >>3313726
    So you would rather have someone always hold your hand and remain as a kid forever instead of growing up and taking responsibility for your own mistakes?
    >> Anonymous 07/01/11(Fri)00:21 No.3313742
    >>3313726

    That's what I said, isn't it? I said:

    > C is barely one step above assembly language.

    Thus, if someone wants complete control over a program and wants to completely optimize the program, C would be a tempting option.
    >> Anonymous 07/01/11(Fri)00:21 No.3313743
    >>3313726
    you and other guy are wrong

    C is fast because the language is smaller and most importantly it is converted to assembly before it is compiled.

    Niglets don't know them some c
    >> Anonymous 07/01/11(Fri)00:22 No.3313747
    >>3313732
    Minecraft
    Runescape
    WOW
    >> Anonymous 07/01/11(Fri)00:23 No.3313753
    >>3313747
    WOW = world of warcraft right? Are you fucking stupid; WOW is LUA for scripting and C/C++ gf java.
    >> Anonymous 07/01/11(Fri)00:24 No.3313757
    LaTeX
    >> Anonymous 07/01/11(Fri)00:24 No.3313758
    >>3313743

    >because the language is smaller
    >smaller

    Herp, derp. Someone's got themselves and edumacation!
    >> Anonymous 07/01/11(Fri)00:25 No.3313767
    >>3313726
    >derp

    C is faster than Java because its compilers optimize for native hardware and don't run through the abstraction of a virtual machine.

    Not running so many layers of class inheritance helps (context switches suck), but for the most part the virtualization of execution in Java carries the most obvious cost.
    >> Anonymous 07/01/11(Fri)00:26 No.3313769
    >>3312033
    >The other day I was writing some code in C++ and gagged a little.
    Enjoy being green forever.
    >> Anonymous 07/01/11(Fri)00:26 No.3313775
    This is kinda unrelated, but since I'm just learning python I figure I'll ask. What can you can you do in C/C++ that I can't do in python? Will I need to eventually learn all three? I'm looking at 2d game creation at the moment.
    >> Anonymous 07/01/11(Fri)00:28 No.3313794
    Bets C book for a beginner? My community college doesn't teach C.
    >> Anonymous 07/01/11(Fri)00:30 No.3313805
    >>3313775

    Hardware manipulation. Of course if you're just making simple little games this sort of thing is outside your territory.

    Also interpreted languages are slow as fuck. At least you can compile python to bytecode but then you're still in the same hole as java.

    >>3313794

    You see that book in the OP pic? That's the one.
    >> Anonymous 07/01/11(Fri)00:30 No.3313809
    >>3313775
    3D games like Halo, Modern Warfare, WOW
    >> Anonymous 07/01/11(Fri)00:31 No.3313811
    >>3313767

    > for the most part the virtualization of execution in Java carries the most obvious cost.

    Yeah, I get that. Maybe Java wasn't the best example to give since everyone is trying to pawn me on something that I already understood..................................................
    >> Anonymous 07/01/11(Fri)00:32 No.3313818
    >>3313805
    >interpreted languages are slow as fuck
    But computers today are fast as fuck.
    >> Anonymous 07/01/11(Fri)00:32 No.3313819
    >>3313775
    performance, hardware, and python library itself is big; so would be hard to embed the entire library
    >> Anonymous 07/01/11(Fri)00:33 No.3313827
    >>3313742
    No, it isn't what you said.

    >>3313767
    > C is faster than Java because its compilers optimize for native hardware
    Even if someone went through the trouble of writing a java compiler---just hypothetical, surely no one would actually do this, of course, right?---it would still be slower because java requires things C does not, such as array bounds checking.
    >> Anonymous 07/01/11(Fri)00:33 No.3313828
    >>3313794
    c programming a modern approach
    >> Anonymous 07/01/11(Fri)00:33 No.3313829
    >>3313794
    Sam's Teach Yourself C in 24 Hours

    Oldie but goodie
    >> Anonymous 07/01/11(Fri)00:33 No.3313831
    >>3313697

    But you have to look at the flip side of that. We live in the year 2011. Processors have gotten complicated and compilers have gotten very good at optimizing code. But code optimization is much harder for compilers to do when you're trying to pull off dark magic with pointers.
    >> Anonymous 07/01/11(Fri)00:33 No.3313832
    >>3313827
    java requires c to even exist ;p
    >> Anonymous 07/01/11(Fri)00:34 No.3313834
    Language war never changes (and is about as terrible as fallout 3).

    There is a certain antiquated elegance about C, though I find STL containers too useful to stick to pure C.
    >> Anonymous 07/01/11(Fri)00:34 No.3313839
    >>3313809
    Those games are poop though. Do good developers follow a different code?
    >> Anonymous 07/01/11(Fri)00:34 No.3313841
    What are popular languages that are still interpreted today? Perl? Python? I don't know about perl but I swear there's uninterpreted pythons floating around.
    >> Anonymous 07/01/11(Fri)00:34 No.3313842
    >>3313829
    >>3313828
    >>3313805
    oh god oh god oh god
    >> Anonymous 07/01/11(Fri)00:35 No.3313845
    >>3313811

    Another reason C is fast is simply because all the major compilers have godlike optimizers.

    >>3313818

    That speed doesn't get you very far if you waste hundreds of clock cycles running a parser in in order to perform a five-cycle operation.
    >> Colonel Coffee Mug !phJ7yIcs.Q 07/01/11(Fri)00:35 No.3313847
    >>3313841

    Common Lisp is experiencing a bit of a renaissance after Practical Common Lisp was published and Paul Graham started writing about how it was so awesome.

    It was used in the computers of Deep Space One, the first interplanetary plasma drive spacecraft.
    >> Anonymous 07/01/11(Fri)00:36 No.3313851
    >>3313839
    >Do good developers follow a different code?
    Yes, Java. It's the language used for coding Wii games.
    >> Anonymous 07/01/11(Fri)00:36 No.3313854
    >>3313841

    http://en.wikipedia.org/wiki/List_of_programming_languages_by_category#Interpreted_languages
    >> Anonymous 07/01/11(Fri)00:37 No.3313855
    >>3313847
    I don't think any popular lisp or scheme distribution is interpreted, though.
    >> Anonymous 07/01/11(Fri)00:37 No.3313856
    >>3313775

    more than 10 sprites
    >> Anonymous 07/01/11(Fri)00:38 No.3313864
    >>3313851
    Where the fuck did you get that from? Wii games in java, better go check yourself.
    >> Colonel Coffee Mug !phJ7yIcs.Q 07/01/11(Fri)00:38 No.3313869
    >>3313855

    You mean compiled? Lisp was designed to be interpreted. SBCL, CCL and CLISP are all interpreter, with the partial exception of CCL which compiles anything you type into the REPL into native code.

    And in any case, all Common Lisp interpreters have compiling options.
    >> Anonymous 07/01/11(Fri)00:39 No.3313871
    >>3313854
    Lua has a JIT version but I must admit it did slip my mind, even though it was already mentioned in this thread.
    >> Anonymous 07/01/11(Fri)00:39 No.3313874
    >>3313827
    >java requires things C does not, such as array bounds checking.

    That and the incredibly huge pile of multiple inheritance in its standard library makes it very heavy. It's enough to make a grown man weep every time an object is instantiated.
    >> Anonymous 07/01/11(Fri)00:40 No.3313878
    >>3313869
    No, I did mean interpreted. AFAIK all distributions compile their code. Maybe not in a REPL. I don't hack any of that stuff, I just program in it.
    >> Anonymous 07/01/11(Fri)00:40 No.3313880
    Java can equal C/C++ for speed in many applications if you know what you're doing. A lot of C/C++ guys are convinced Java is slow but don't actually have recent experience.
    >> Anonymous 07/01/11(Fri)00:41 No.3313884
    >>3313874
    I almost mentioned the OO stuff but I let it go since we were talking about C and not C++.
    >> Anonymous 07/01/11(Fri)00:42 No.3313886
    >>3313880

    Guy with recent experience here. Pry it out of the VM and we'll talk.
    >> Anonymous 07/01/11(Fri)00:43 No.3313900
    >>3313884
    It wouldn't make much difference. Where C++ has two layers, Java has fifteen.
    >> Anonymous 07/01/11(Fri)00:44 No.3313902
         File1309495446.png-(197 KB, 684x741, 1309235268646.png)
    197 KB
    >>3313880
    Java got a whole hell of a lot faster sometime around 2008, correct? And Minecraft would have been impossible without that, right?

    Anyway, I'm wary of anything that isn't compiled into native machine code for games. For most non-game applications I work on however speed won't matter so I may as well use Ruby running on an interpreter written in fucking PHP.
    >> Anonymous 07/01/11(Fri)00:44 No.3313904
    >>3313886

    Thanks for illustrating my point, fag.
    >> Anonymous 07/01/11(Fri)00:45 No.3313909
    >>3313880
    I use java, c, c++ regularly and java is slow for certain things (graphics being a big part). Not only that the massive amount of complication that goes in java IO is insane.

    One last gripe about java is how much anonymous classes must be used to get shit done.
    >> Anonymous 07/01/11(Fri)00:45 No.3313915
    >>3313904

    Quit reaching. You're making me embarrassed for you.
    >> Anonymous 07/01/11(Fri)00:46 No.3313917
    >>3313902
    Java got "faster" the second sun/oracle started supporting gaming on it.... And that is not a language improvement but a library improvement (gl)
    >> Anonymous 07/01/11(Fri)00:47 No.3313921
    >>3313874
    It doesn't make me weep. What makes me weep is the thought of all these people that think they need OO to solve their problem, but then choose a horrible instantiation of OO ideas (one might even say "perversion") and use C++ because "derp its fast".
    >> Anonymous 07/01/11(Fri)00:48 No.3313928
    I'm done talking about C.

    Java is fucking great to get things to work without making a hack job. Not to mention that it's plug and play on any machine thanks to good old VM. Garbage collection you say? Psht! Please!
    >> Anonymous 07/01/11(Fri)00:49 No.3313931
    >>3313909
    > One last gripe about java is how much anonymous classes must be used to get shit done
    Usually first class anything added to a language is a good thing. Maybe java's syntax is causing problems? After having programmed in scheme for so long, if I sense the project would start getting complicated in C I just put on my big boy pants. I haven't touched java in years and years.
    >> Anonymous 07/01/11(Fri)00:52 No.3313942
    >>3313928
    Why not just use python? Python can do anything java can that makes java 'useful'. As a matter of fact I dumped java for python b/c of the 'complication' in java for getting simple tasks done.
    >> Anonymous 07/01/11(Fri)00:53 No.3313950
         File1309496015.png-(17 KB, 586x204, natives.png)
    17 KB
    >>3313902
    >Java got a whole hell of a lot faster sometime around 2008, correct? And Minecraft would have been impossible without that, right?

    The heavy lifting of Minecraft's graphics engine is actually done by native code (DLLs under Windows). It just hooks into it in order to do things like 3D.

    eg:
    Open %APPDATA%\.minecraft\bin

    Notice the "natives" folder.

    Inside? Native Windows DLL libraries for CPU/GPU intensive functions.

    Hooks to DirectX (or raw for systems lacking DX) for input, OpenGL for rendering, OpenAL for audio.

    Minecraft would not be able to run acceptably on most home PCs without this help.
    >> Anonymous 07/01/11(Fri)00:53 No.3313951
    >>3313931
    Java NIO is insane... Just to read a binary file you have to anonymize 3 or 4 classes. What I found funny was how java NIO was supposedly one of the 'best things' java has had. Fucking sucks; keep it simple.
    >> Colonel Coffee Mug !phJ7yIcs.Q 07/01/11(Fri)00:54 No.3313954
    >>3313942

    Common Lisp is twice as slow as C.

    Python is ten times as slow as C.

    Also, does Python have a tool where you can do:

    (ql:quickload 'some-library)

    To automatically download and install the most recent version of some-library?
    >> Anonymous 07/01/11(Fri)00:55 No.3313960
    I wish I knew what you guys were talking about.
    Some day...
    >> Anonymous 07/01/11(Fri)00:55 No.3313963
    >>3313954
    Are you referring to something like apt-get in linux; that is in python that will update a lib specifically in python?

    Not that I am aware of; but does java, c, c++, etc have that? nope.
    >> Colonel Coffee Mug !phJ7yIcs.Q 07/01/11(Fri)00:56 No.3313969
    >>3313963

    >Are you referring to something like apt-get in linux; that is in python that will update a lib specifically in python?

    Yes.

    >Not that I am aware of; but does java, c, c++, etc have that? nope.

    No, they don't. Lisp does. That's my point.
    >> Anonymous 07/01/11(Fri)00:56 No.3313970
    >>3313954

    It actually does (so does perl, for that matter), though the name eludes me at the moment.
    >> Anonymous 07/01/11(Fri)00:57 No.3313972
    >>3313960

    don't worry most people in the thread don't know what they're talking about either
    >> Anonymous 07/01/11(Fri)00:57 No.3313973
    >>3313960
    I started wanting to make a game like runescape... learned java... Gave up... Learned java... gave up... learned C++... hated it... finished learning java... Made some cool stuff in java... Gave up java... Went to C... Gave up C... Went to java... went to php... powershell...python... and now i'm here
    >> Anonymous 07/01/11(Fri)00:57 No.3313974
    >not using cpp in on your UNIX OS

    I seriously hope you guys don't do this
    >> Colonel Coffee Mug !phJ7yIcs.Q 07/01/11(Fri)00:57 No.3313976
    >>3313963

    Also:

    >The entire Haskell programming language written in 10,000 lines of Common Lisp macros
    >http://en.wikipedia.org/wiki/Qi_(programming_language)
    >> Anonymous 07/01/11(Fri)00:58 No.3313983
    >>3313963
    racket and chicken scheme have similar features
    >> Colonel Coffee Mug !phJ7yIcs.Q 07/01/11(Fri)00:59 No.3313987
    >>3313983

    They're Lisp.
    >> Anonymous 07/01/11(Fri)00:59 No.3313989
    >>3313969
    Not that I cant recompile a lib? I've seen list syntax and I've wanted to shoot myself... To learn that language for that 'perk' is... just not worth it.
    >> Anonymous 07/01/11(Fri)01:04 No.3314003
    >>3313973
    well now I'm thoroughly depressed
    >> Anonymous 07/01/11(Fri)01:07 No.3314014
    >>3313987
    Indeed. But to the uninitiated they might seem like different languages instead of different approaches to the one true language.
    >> Anonymous 07/01/11(Fri)01:11 No.3314028
    C++ is basically OOP C with some extra tweaks to the compiler

    that's why most C++ would compile your C program
    >> Anonymous 07/01/11(Fri)01:13 No.3314031
    >>3314028

    Not just most, any compliant C++ compiler should compile any proper C code.
    >> Anonymous 07/01/11(Fri)01:14 No.3314036
    >>3313989

    Lisp has the simplest syntax in the world. It uses the exact same eval notation everywhere. Better than a new symbol for every new case. How complicated is that?
    >> Anonymous 07/01/11(Fri)01:14 No.3314037
    >>3314028
    > C++
    > OO
    yeah, um... not really.
    >> Anonymous 07/01/11(Fri)01:19 No.3314057
    >>3314031
    i'm not sure whether the C++ compilers come with all the C libraries?
    >> Anonymous 07/01/11(Fri)01:19 No.3314058
    http://yosefk.com/c++fqa/class.html

    [7.5] How does C++ help with the tradeoff of safety vs. usability?

    FQA: When you need multiple instances and encapsulation in C, you use a forward declaration of a struct in the header file, and define it in the implementation file. That's actually better encapsulation than C++ classes - there's still no run-time encapsulation (memory can be accidentally/maliciously overwritten), but at least there's compile-time encapsulation (you don't have to recompile the code using the interface when you change the implementation).

    The fact that a crude C technique for approximating classes is better than the support for classes built into the C++ language is really shameful. Apparently so shameful that the FAQ had to distort the facts in an attempt to save face (or else the readers would wonder whether there's any point to C++ classes at all). The FQA hereby declares that it will not go down this path. Therefore, we have to mention this: the forward declaration basically makes it impossible for the calling code to reserve space for the object at compile time. This means that a struct declared in a header file or a C++ class can sometimes be allocated more efficiently than a forward-declared struct. However, this is really about a different tradeoff - safety vs. efficiency, and there's no escape from this tradeoff. Either the caller knows about the details such as the size of an object at compile time - which breaks compile-time encapsulation - or it doesn't, so it can't handle the allocation.

    Anyway, here's the real answer to the original question: C++ helps with the tradeoff of safety vs. usability by eliminating both.

    C++ is extremely unsafe because every pointer can be used to modify every piece of memory from any point in code. C++ is extremely unusable due to cryptic syntax, incomprehensible semantics and endless rebuild cycles. Where's your tradeoff now, silly C programmers?
    >> Anonymous 07/01/11(Fri)01:20 No.3314065
    >>3314057

    It's required for standards compliance.
    >> Elektron !M4Rlambda. 07/01/11(Fri)01:21 No.3314071
    >>3314037
    ...What? C++ was designed to be modular in the aspect you could chose functional and/or OO design strategies (you're not forced to utilize either), but the majority of enterprise work done in C++ as opposed to C is mainly due to the option for OO-like style.
    >> Anonymous 07/01/11(Fri)01:21 No.3314074
    >>3313989
    >>3313989

    open paren
    func name
    arg one
    arg two
    etc
    close paren

    No hashesfor the preprocessor. No specal syntax for declarin classes o funtions or variables or structs. Was it really that hard?
    >> Anonymous 07/01/11(Fri)01:23 No.3314081
    >>3312033
    Because most people who are just out of college are more interested in making things object oriented than in maintaining perfectly good C code.
    >> Anonymous 07/01/11(Fri)01:23 No.3314082
    >>3314071
    > OO-like style
    I guess this is a description of C++.
    >> Anonymous 07/01/11(Fri)01:24 No.3314084
    >>3313989
    > (square a)
    > is SOOO much harder than
    > square(a)
    I lol'd
    >> Anonymous 07/01/11(Fri)03:06 No.3314369
    Why is OO so useless?
    >> Anonymous 07/01/11(Fri)03:18 No.3314394
    C is horrible.
    >> Anonymous 07/01/11(Fri)03:28 No.3314411
    Um C is not elegant, perhaps your definition of elegant is off. Java is more elegant than C given the definition of elegant, but we'd both agree that the qualities we associate with things that are elegant (intellectualism and general appeal) are not in java whereas they are in C. C is too tedious to be elegant.

    Python, on the other hand....
    >> Anonymous 07/01/11(Fri)04:15 No.3314527
    OP has never used Ruby.
    >> Anonymous 07/01/11(Fri)04:17 No.3314531
    >>3313575
    >crossplatformness
    >c

    I've got bad news for you...
    >> Scientist !!ThFjnJh4EkH 07/01/11(Fri)04:17 No.3314532
    >>3312033
    >C
    >elegant
    Lolno.
    >> Anonymous 07/01/11(Fri)04:22 No.3314544
    >>3314531

    Wait...C++ is valid for Mac OS, Xbox(fucking windows) and PS...and Linux...and Wii.
    >> Scientist !!ThFjnJh4EkH 07/01/11(Fri)04:24 No.3314547
    >>3313880
    For some apps, yes. For large memory apps, or CPU intensive apps, no. It depends.
    >> Anonymous 07/01/11(Fri)04:24 No.3314549
    No. It's utter shit. Learn Python and you'll get what elegance means.
    >> Scientist !!ThFjnJh4EkH 07/01/11(Fri)04:26 No.3314557
    >>3314031
    After a few minor modifications sure, the biggest of which is implicit conversions of void pointer to other typed pointers.
    >> Anonymous 07/01/11(Fri)04:35 No.3314585
    >>3314544
    Try writing a program in C/C++ (or any compiled language for that matter) and then without modifying it AT ALL try compiling it on each of those platforms. Enjoy your massive number of errors for anything that isn't a trivial "hello world" program.

    The reason people use Java and interpreted languages is because porting them is often a matter of copying and pasting the code and maybe, maybe, changing a few lines that handle OS specific things (if the VM or interpreter don't handle that for you). I'm not even a fan of Java, but if you can't see that this is a huge advantage you've probably never had to actually have code running on more than one device in a real world situation.

    And as far as people hyping up C's supposed performance advantage, yes it exists, but when you compare development time of applications written in languages like C and C++ versus languages like Java and Ruby/PHP/Python (and increasingly JavaScript on the server side!) it's pretty clear who the winner is. C has it's place; for the underlying OS specific libs for interpreted languages, for compilers, for VMs, for games (that's really more for C++ though), and for super specific embedded apps that need to run on exotic hardware. But outside of that there's often a plethora of better language choices. And I say this as someone who learned C/C++ as my first language and as someone who generally holds it in high regard.
    >> Anonymous 07/01/11(Fri)04:36 No.3314590
         File1309509413.jpg-(13 KB, 337x150, images.jpg)
    13 KB
    >>3312033
    >Why isn't everything written in pure simple C?

    Because they have to dumb it down for the less intelligent folk.
    >> Scientist !!ThFjnJh4EkH 07/01/11(Fri)04:36 No.3314593
    >>3314585
    >Try writing a program in C/C++ (or any compiled language for that matter) and then without modifying it AT ALL try compiling it on each of those platforms. Enjoy your massive number of errors for anything that isn't a trivial "hello world" program.

    You exaggerate. Also, this is less true nowadays with modern compilers. If you're still using Visual studios 2003, then of course because 2003 is a piece of shit.
    >> Anonymous 07/01/11(Fri)04:40 No.3314611
    >>3314585
    Enjoy your toy language.
    >> Anonymous 07/01/11(Fri)04:43 No.3314618
    >>3314593
    Okay, so I may have exaggerated a bit. But that statement was mainly directed at folks who seem to think that you can get low level hardware stuff to just magically port from OS to OS and from device to device without writing (potentially lots of) additional code. You simply can't.
    >> Anonymous 07/01/11(Fri)04:44 No.3314629
    >>3314611
    Enjoy your bug prone code, increased development time, and decreased maintainability.
    >> Anonymous 07/01/11(Fri)04:46 No.3314636
    >>3314618
    Have you heard of cross-platform libraries? If your intention is to write a program for multiple platforms, then you should write it so that it could easily be recompiled on different platforms with minimal recoding.
    >> Scientist !!ThFjnJh4EkH 07/01/11(Fri)04:46 No.3314637
    >>3314618
    Of course. If you're writing device drivers, of course that's not portable.

    If you're trying to write portable code, then it's relatively unusual to encounter code which compiles on one platform but chokes on another for any of the recent compilers on modern desktops.
    >> Anonymous 07/01/11(Fri)04:51 No.3314659
    >>3314629
    Enjoy OD'ing on caffeine cling desperately onto your pipe dream
    >> Anonymous 07/01/11(Fri)04:51 No.3314665
    >>3314590
    Go and make a big MMORPG in C, go maker an evolution simulator in C. THAT would be stupid. Not all languages are for same things and you should realize this, you won't use Python to make an OS or do robotics, you'll use C.
    >> Anonymous 07/01/11(Fri)04:53 No.3314673
    >>3314665
    You wouldn't use Python to make an MMORPG either.
    >> Anonymous 07/01/11(Fri)04:55 No.3314678
    >>3314637
    >>3314636
    True, but my underlying point is that you're probably better off developing in a language that's not C/C++ if you have no need to be so close to the hardware. Just because development can be done with C/C++ with relative ease in terms of cross platformness compared to the past doesn't mean that you won't run into the dozen other problems C/C++ have when it comes to development time and maintainability. Simply put, I can get shit done in a language like Ruby or Python 10 times faster than I could in C/C++. And have the code I write be smaller (and thus less prone to bugs) and more maintainable in the future. And no cross platform library or advances in compilers is going to change that any time soon.
    >> Scientist !!ThFjnJh4EkH 07/01/11(Fri)04:57 No.3314683
    >>3314678
    I doubt a lot of these claims for anything but toy or small projects. At least, I doubt that the severity is anywhere near as bad as you make it out to be.
    >> Anonymous 07/01/11(Fri)04:58 No.3314687
    >>3314683
    Funny, I would say the opposite. The only time I would say my concerns are admittedly overblown is for toy or small projects.
    >> Scientist !!ThFjnJh4EkH 07/01/11(Fri)05:00 No.3314696
    >>3314687
    It's hard to say. I doubt anyone is really in possession of hard facts - specifically good statistically sound studies. Thus, the best we have is hunches, guesses, anecdotal evidence, and so on. That's why computer science isn't so much a science, and isn't so much engineering.
    >> Anonymous 07/01/11(Fri)05:02 No.3314701
    >>3314696
    I can't help but agree.
    >> Anonymous 07/01/11(Fri)05:02 No.3314704
    >>3314696
    >not science
    >not engineering

    Then it's either religion or art.
    >> Scientist !!ThFjnJh4EkH 07/01/11(Fri)05:03 No.3314707
    >>3314704
    Yeah, and? IMHO, code monkeying is a little bit of science, a little bit of engineering, and a little bit of art.
    >> Anonymous 07/01/11(Fri)05:04 No.3314711
    >>3314696
    I disagree. Fact is that there isn't a commercial application at your local computer store that's written in Java or another more "modern" language.
    >> Anonymous 07/01/11(Fri)05:07 No.3314714
    >>3314711
    >implying that in 2011 ANYONE goes to a computer store to buy applications.

    Maybe it's because I've spent the last 4 years as a web app developer but when people say this I can't help but LOL.
    >> Scientist !!ThFjnJh4EkH 07/01/11(Fri)05:09 No.3314719
    >>3314711
    First, I was arguing in favor of C and C++ being usable and good for large projects.

    Second, oh boy, here we go again. There are plenty of big, large scale, applications written to **Java**. My company nowadays writes 80%+ Java code, the rest basically C++ (with a few custom in-house languages thrown in). We sell to fortunate 500 companies for many millions of dollars per sale. You won't see our stuff in the corner store. Each sale is done on a per company basis from a plethora of sales bitches. Customers include Walmart, the PRC (mainland Chinese Government), and so on.

    This is what we meant yesterday by "Enterprise" applications. And no I'm not telling you my company.
    >> Anonymous 07/01/11(Fri)05:15 No.3314725
    >>3314711
    > implying even a small fraction of commercial applications can be found in a computer store
    >> Anonymous 07/01/11(Fri)05:15 No.3314726
    >>3314716
    >First, I was arguing in favor of C and C++ being usable and good for large projects.

    I'm not that guy, but I want to make it clear I'm not disagreeing with this in any absolute sense. I just think that for most large projects these days there are better options. But as always, use the right tool for the right job. If Java or Ruby or Python or whatever won't cut it for one reason or another then use whatever will.

    Hell, even in my area of web development there are cases where C/C++ make sense! Facebook created HipHop to do just this http://en.wikipedia.org/wiki/HipHop_for_PHP.
    >> Anonymous 07/01/11(Fri)05:19 No.3314733
    >>3314673
    I did, it works perfectly. C++ might be a better choice, but I like Python and know it better.
    >> Scientist !!ThFjnJh4EkH 07/01/11(Fri)05:19 No.3314734
    >>3314726
    No disagreements per se. I haven't had enough job experience yet to comment further. I'm pretty proficient with C++, passing familiarity with C, and decently proficient with Java. I wrote my own make from scratch, and tolerably familiar with bash. That's about it.
    >> Anonymous 07/01/11(Fri)05:26 No.3314744
    >>3314734
    Well, using what you know is probably most important. If you don't know a language don't try and use it for anything critical! But at the risk of sounding like an evangelist, give Ruby a try (http://tryruby.org/). I've been using it professionally for 4, almost 5, years now and I love it.
    >> Anonymous 07/01/11(Fri)05:31 No.3314757
    >>3314744
    Also, reading this http://www.amazon.com/Metaprogramming-Ruby-Program-Like-Pros/dp/1934356476 changed how I look at programming.
    >> Anonymous 07/01/11(Fri)10:18 No.3315442
    http://archive.adaic.com/intro/ada-vs-c/cada_art.html

    Ada reduces development and testing costs by 50%, maintenance costs by 80%, and bugs by ~70%. And this is the original '83 version, not '95 or 2005 versions which added object orientation and many other things.
    >> Anonymous 07/01/11(Fri)10:19 No.3315446
    Like I said, c/c++ with all the fail taken out.
    >> Anonymous 07/01/11(Fri)11:13 No.3315627
    This topic has me confused. I'm trying to learn a language other than HTML. It's going to be for game creation and anything else I can think of, but I've seen that I can code games in python, java, C/C++. Which do I learn? Will I need all of them eventually? Which should I start with, because it's python at the moment.
    >> Anonymous 07/01/11(Fri)12:15 No.3315804
    >>3314673
    Maybe not a client. But, fine for a server

    "Python enabled us to create EVE Online, a massive multiplayer game, in record time. The EVE Online server cluster runs over 50,000 simultaneous players in a shared space simulation, most of which is created in Python. The flexibilities of Python have enabled us to quickly improve the game experience based on player feedback" said Hilmar Veigar Petursson of CCP Games.

    Speculation below:
    Python's ability to easily interface with pure C probably made it easy to architect the software in python and optimize any time critical functions by slowly replacing python with C.
    >> Anonymous 07/01/11(Fri)12:19 No.3315815
    >>3315627
    Keep learning with python. Here's what to keep in mind. By the time you need something like C you'll know enough to know you need it. Don't use something based on overly broad statements. It's best to use a different tool if you know you need it based on your own experience.
    >> Anonymous 07/01/11(Fri)12:25 No.3315832
    I feel you OP. Some things just are.
    >> Anonymous 07/01/11(Fri)12:43 No.3315865
    >>3315627

    Game creation? For flash games you'd want flash/actionscript, which is sort of based off java. If you want to make droid games the entire API is java (but I wouldn't start out with droid games, you need to know a lot about the hardware). If it's your first language ever python might be a good idea just because it's so easy to program with. But then again, there's a lot of details going on that python handles for you, which might be important and you'd only learn in C/C++/java
    >> Anonymous 07/01/11(Fri)12:48 No.3315885
         File1309538903.jpg-(31 KB, 480x600, son-i-am-disappoint.jpg)
    31 KB
    ctrl+f FORTRAN
    >0 results
    >> Anonymous 07/01/11(Fri)12:49 No.3315891
         File1309538984.png-(151 KB, 399x517, 611c5d9641cc65e5fb3b5dba321474(...).png)
    151 KB
    >>3315885

    ctrl+f faggot

    1 result, now 2
    >> Anonymous 07/01/11(Fri)12:52 No.3315900
    >>3315891
    Y U SO MAD THO
    >> sage Anonymous 07/01/11(Fri)12:52 No.3315903
    sage
    >> Anonymous 07/01/11(Fri)12:59 No.3315923
    >>3315815

    That was my main worry. That I wouldn't know when I needed a different language.

    >>3315865

    I'm looking at more games that run on a PC/Mac. I really want to make something like Super Metroid, but can I make a game like that with python?
    >> ႼЋïŁႣƧტƿḩЄƦṥ !Scone2booQ 07/01/11(Fri)13:08 No.3315956
    >>3315923
    No, you need a compiled language to write a game, like c or c++, not a scripting language like python.
    >> Anonymous 07/01/11(Fri)13:09 No.3315958
    >>3315956
    Real men use interpreted langauges for their games.
    >> Anonymous 07/01/11(Fri)13:11 No.3315966
    >>3315956

    But if EVE Online was made in python why can't a simple 2d platformer? Sorry.
    >> Anonymous 07/01/11(Fri)13:13 No.3315976
         File1309540416.jpg-(314 KB, 1035x851, c.jpg)
    314 KB
    >> Anonymous 07/01/11(Fri)13:14 No.3315980
    >>3315956
    I made a MMORPG in Python, bitch. There's a 2D engine AND a 3D engine for Python.
    >> Anonymous 07/01/11(Fri)13:16 No.3315986
    >>3315976
    Is this real? Sauce?
    >> ႼЋïŁႣƧტƿḩЄƦṥ !Scone2booQ 07/01/11(Fri)13:17 No.3315991
    >>3315966
    Well it's true that graphics cards today do a lot of the processing, so you can get away with using languages that are crappy for computation to do things with graphics -- but that doesn't make it smart.
    >> Anonymous 07/01/11(Fri)13:17 No.3315992
    >>3315980
    Brainfuck or GTFO.
    >> Anonymous 07/01/11(Fri)13:18 No.3315997
    >>3315992
    What?
    >> Anonymous 07/01/11(Fri)13:19 No.3316000
         File1309540798.jpg-(69 KB, 407x405, oh yes you are you quiche eate(...).jpg)
    69 KB
    >>3315991
    >so you can get away with using languages that are crappy for computation
    >good at computation = best language
    In that case, FORTRAN confirmed for best language. /sci/ programmers confirmed for quiche eaters.
    >> Anonymous 07/01/11(Fri)13:20 No.3316002
    >>3315991

    So python can do just about everything, but it requires more computational power to do than C or C++?
    >> Anonymous 07/01/11(Fri)13:23 No.3316013
    >>3316002
    http://en.wikipedia.org/wiki/Turing_completeness
    >> Anonymous 07/01/11(Fri)13:26 No.3316030
    >>3316013

    That's a little advanced for me man.
    >> Colonel Coffee Mug !phJ7yIcs.Q 07/01/11(Fri)13:27 No.3316042
    >>3316030

    Most modern languages (About everything a compiler has been written for) are Turing complete. This means they can do anything
    >> Anonymous 07/01/11(Fri)13:27 No.3316044
    >>3312033
    >>3312033
    I was coding in striaght C back when the ++ extensions were just becoming available. I had migrated the project I was working on from Turbo C to Borland C++ because of the way the Turbo C runtime code handled one of the keyboard keys (PrtSc key to be exact; I couldn't capture it properly in TC). After having Borland C++ for a while I took the time to learn the ++ extensions. I saw the value in them; if you're working with large datasets they're handy, but for most other things they're just extra work to do the same things you could do with a few lines of straight classic C.

    Incidentally, if you look into the history of C++, you'll find that the ++ extensions were developed at Bell Labs as a way to make coding for something like manipulating Bell Telephone's entire customer billing database more streamlined; it really *was* developed for use with large datasets, like I said above. Some of the operator overloading can be handy, but you can work just as well without them, too. I think it's mainly a question of personal preference as to which way you want to work it, but if you're working as a programmer for a company and you're maintaining existing code, you may not have a choice because it'll likely already have ++ code in it.
    >> Anonymous 07/01/11(Fri)13:28 No.3316049
    >>3316042

    I guess I'll just stick with python then. Thanks guys.
    >> Anonymous 07/01/11(Fri)13:28 No.3316051
    >>3316030
    The principle is:
    >something that is Turing complete is fully capable of computing everything that can be computed, memory and time limitations notwithstanding. Python is Turing complete. C is Turing complete. Most languages are Turing complete.
    >> Anonymous 07/01/11(Fri)13:30 No.3316062
    >>3316049
    If you have infinite time and memory, every Turing complete language is pretty much equal. IRL, we don't have infinite time and memory. That is a good reason for using certain languages for certain things. That said, Python is generally good enough for current and future hardware, so go nuts on it but be mindful of your demographic's hardware. :)
    >> Anonymous 07/01/11(Fri)13:33 No.3316069
    >>3316062
    I have never seen something like this happen on 4chan.
    >> Anonymous 07/01/11(Fri)13:37 No.3316082
    >>3316069
    ... explain please.
    >> Anonymous 07/01/11(Fri)13:40 No.3316092
    >>3316082
    You've actually been objective and nice to someone!
    >> ႼЋïŁႣƧტƿḩЄƦṥ !Scone2booQ 07/01/11(Fri)13:46 No.3316105
    >>3316002
    Yes.
    >> ႼЋïŁႣƧტƿḩЄƦṥ !Scone2booQ 07/01/11(Fri)13:47 No.3316109
    >>3316000
    >implying a fortran program computes faster than a c program
    >> Anonymous 07/01/11(Fri)13:53 No.3316130
    Fuck a C thread on /sci/ and I missed it...

    OP, if you think C is the ultimate, you should try writing assembly. Then you'll be back here asking "Why isn't everything written in pure simple ASM?"
    >> Anonymous 07/01/11(Fri)13:54 No.3316136
    >>3316130
    > he believes C is a "low level language"
    laughingwhores.jpg
    >> Anonymous 07/01/11(Fri)13:57 No.3316150
    >>3316136
    C is only one step up from assembly.
    >> Anonymous 07/01/11(Fri)13:57 No.3316154
    >>3316136
    > no he doesn't
    C is a high level language, but the "lowest" of the high level languages. Clearly, OP is attracted to C, probably because it's minimal and has a tight correspondence to the hardware. ASM is just one step closer to that raw beauty. Don't be mad because you can't write ASM.
    >> Anonymous 07/01/11(Fri)13:58 No.3316156
    >>3316130
    68KASM here. All other is fgts.
    >> Anonymous 07/01/11(Fri)14:00 No.3316164
    >>3316156
    Fuck yes, Amiga-bro
    >> Anonymous 07/01/11(Fri)14:06 No.3316177
    >>3316130
    Because it's inconvenient for most of the things today? Don't get me wrong I'm working with micro-kernels written in ASM, but try to make a game in that.
    >> Anonymous 07/01/11(Fri)14:09 No.3316186
    >>3316177
    >implying I want to make a game in the first place
    >> Anonymous 07/01/11(Fri)14:10 No.3316188
    >>3316186
    Don't pretend to be stupid. I was giving a game as an example for "most of the things today".
    >> Anonymous 07/01/11(Fri)14:11 No.3316190
    guys guys guys
    why are we arguing about what language is best when we could be using this time to be programming?
    sure languages have their pros and cons and everyone has their own personal prefrences but at the end of the day what matters is that you made something that works and isn't horribly buggy or slow!
    >> Anonymous 07/01/11(Fri)14:12 No.3316196
    >>3316177
    >http://en.wikipedia.org/wiki/List_of_Sega_Mega_Drive_games
    >http://en.wikipedia.org/wiki/List_of_Super_Nintendo_Entertainment_System_games_(A–M)
    >http://www.retrocollect.com/News/project-md-new-sega-megadrive-homebrew-game-announced.html
    Did I win the Internet?

    Also, currently writing a SMD homebrew game myself...
    >> Anonymous 07/01/11(Fri)14:16 No.3316217
    >>3316196
    You missed the "today" part. Once I get a game like, say, Half-Life written in ASM then you've won.
    >> Anonymous 07/01/11(Fri)14:24 No.3316256
    >>3316217
    >You missed the "today" part.
    So I did. Sorry.

    >Half-Life written in ASM
    Yeah, I'll back down there thanks.
    >> Anonymous 07/01/11(Fri)14:26 No.3316266
    >>3316256
    >Yeah, I'll back down there thanks.
    That's my point. ASM is used only if you need some really low level shit to be done.
    >> Anonymous 07/01/11(Fri)14:29 No.3316278
    >>3316266
    I fully agree nowadays. I did somehow miss the word "today" in that previous post. Still, I'd totally love to see something like Half-Life written in ASM.
    >> Anonymous 07/01/11(Fri)14:45 No.3316326
    >>3314683
    >>3314696
    >>3315903

    From now on, I am instating a rule - any time someone sages a programming thread because it's "not /sci/", I will make a new thread about programming. You've earned yourself three so far.
    >> Anonymous 07/01/11(Fri)14:49 No.3316343
         File1309546149.gif-(68 KB, 300x300, I love you 06.gif)
    68 KB
    >>3316326
    I love you.
    >> Anonymous 07/01/11(Fri)14:59 No.3316376
    >>3316326

    I was serious.
    >>3316370
    >> why c++ was created Anonymous 07/01/11(Fri)15:05 No.3316407
    http://harmful.cat-v.org/software/c++/

    http://harmful.cat-v.org/software/c++/I_did_it_for_you_all
    >the second link is a better read
    >> Anonymous 07/01/11(Fri)15:23 No.3316472
    >>3316407
    Hoax. Most likely.
    >> Anonymous 07/01/11(Fri)15:29 No.3316512
    >>3316472
    first stage is denial bro...
    >> Anonymous 07/01/11(Fri)15:31 No.3316525
    >>3316407
    i've been reading that site, and am now wondering why such hate towards OO programming and especially C++.
    (i ask this not as an expert programmer, just out of curiosity)
    >> Anonymous 07/01/11(Fri)15:37 No.3316568
    >>3316525
    no ideas....
    he likes go, limbo (both of which i've never heard of or taken seriously) c , and python (which i use)

    i stumbled across his site 2 days ago, and found that i agreed with quite a few things on the page
    >> Anonymous 07/01/11(Fri)15:38 No.3316570
    >>3316525
    Because its useless in 99% of cases. Most of the time it is used just to use it. Code without OO its almost always simpler and more straightforward to read/write.
    >> Anonymous 07/01/11(Fri)15:41 No.3316584
    >>3316570
    How does one into abstraction elegantly without OO?
    inb4 shitty function pointers
    >> Anonymous 07/01/11(Fri)15:42 No.3316585
    >>3316570
    >in the toy programs i write

    forgot a bit.
    >> Anonymous 07/01/11(Fri)15:42 No.3316588
    >>3316512
    Actually, I am a 68KASM programmer. Not touched C++ or even given it a look. C will likely be my next language to learn anyway.

    Still, it sounds like a hoax to me. Also, http://www2.research.att.com/~bs/ieee_interview.html and http://public.research.att.com/~bs/ieee_interview.pdf.
    >> Anonymous 07/01/11(Fri)15:44 No.3316597
    >>3316588
    it is....
    >> Anonymous 07/01/11(Fri)15:52 No.3316626
    >>3316584
    Its the same shit, its just hidden by the C++ compiler. Why hide something that is easily understood?
    >> Anonymous 07/01/11(Fri)15:52 No.3316627
    >>3316585
    define toy program
    >> Anonymous 07/01/11(Fri)15:58 No.3316647
    >>3316627

    the stuff you write.
    >> Colonel Coffee Mug !phJ7yIcs.Q 07/01/11(Fri)15:58 No.3316650
    >>3316584

    This is what I hate about C++ programmers. You think there is only one path to abstraction because OOP was the only thing to be added to C after ten years.

    Have you never thought that its inflexibility was merely because it's a shit, monolithic language? A relic from a time that's already; thankfully, in the past?
    >> Anonymous 07/01/11(Fri)16:01 No.3316663
    >>3316650
    Are you implying that C is outdated?
    >> Colonel Coffee Mug !phJ7yIcs.Q 07/01/11(Fri)16:03 No.3316666
    >>3316663

    For most ordinary purposes, yes, unless you're writing an operating system kernel or a compiler/interpreter.
    >> Anonymous 07/01/11(Fri)16:14 No.3316711
    >>3316666
    Fuck you I write everything in C and it works just fine. I know of no reasons to change this habit.
    >> Anonymous 07/01/11(Fri)16:21 No.3316744
    >>3316711
    >still not getting that different languages have different purposes
    >> Anonymous 07/01/11(Fri)16:22 No.3316751
    you guys need to learn what job requires what tool:
    with todays optimizer its useless to write a real application for a desktop pc from scratch in assembler, nonetheless it might be useful to look at chokepoints in the compiled code and optimize those by hand, using assembler.
    C and C++ is one step above assembler, very good for hardware intensive stuff: games, simultaions, drivers...
    If speed or hardwarecost are of no or low issue, using java, phyton or even php is a viable alternative, after all why program for month until you reach the "perfect" program while you can just slap somehing together that works and add server nodes when it does not work so good anymore.

    There is also the issue of scale: a 2nd best solution might work for most (i.e. a webserver written in bash or php is enough for a 500 visitor homepage) but as soon as you grow beyond a significant threshold it is cheaper to actually optimize or completely rewrite code than to add servers. (see facebook).
    >> Anonymous 07/01/11(Fri)16:22 No.3316753
    The learning curve of C is bigger, it's not so easy to develop web apps, the code is certainly not elegant at all and it's hard to mantain, because you need C programmers which are rare these days.

    New generations usually start with Java or C++.

    I agree with the opinion stated above unless you're writing an operating system kernel or a compiler/interpreter don't go with C.
    Pointers are a piece of shit.

    Ok, you can kill me know
    >> Anonymous 07/01/11(Fri)16:22 No.3316754
    >>3316666
    Son, i am dissapoint!
    go masterbate in a vm.
    >> Anonymous 07/01/11(Fri)16:24 No.3316762
    >>3316753
    A C program can output html files.
    >> Anonymous 07/01/11(Fri)16:26 No.3316768
    >>3316762

    So? It doesn't compensate the other problems stated above
    >> Anonymous 07/01/11(Fri)16:29 No.3316784
    >>3316666
    You don't know what are you talking about. What about embedded systems? Do you think you can afford loading hundreds of MB large virtual machines there? Do you think that embedded programming is something that is rarely encountered?
    What about vidya? Graphics intense applications? Numerical simulations (especially these since we're in /sci/. Applications using TBs of memory? No problem.)
    Go ahead and write it in something that has 30x-100x times larger memory footprint and runs as twice as slow as C/C++ (http://shootout.alioth.debian.org/u64q/java.php).

    I'm not saying that C is the Best Language Ever (TM) but there are hundreds of areas where simply there is no better tool but your ignorance won't allow you to see them.

    In other words, go fuck an anthropomorphic armadillo and shut up.
    >> Anonymous 07/01/11(Fri)16:31 No.3316794
    >>3316784
    far out man!
    >> Anonymous 07/01/11(Fri)16:32 No.3316797
    >>3316784
    nope.jpg

    It's not object oriented, it has no future.
    >> Anonymous 07/01/11(Fri)16:32 No.3316799
         File1309552372.png-(37 KB, 640x211, lisp_cycles.png)
    37 KB
    >> Anonymous 07/01/11(Fri)16:40 No.3316852
    OS's, embedded systems, simulations, high-tech games (PS3, XBox 360, PC) -> C wins
    Web apps -> C fails, well not fails, but Java and PHP fuck it in the ass
    >> Anonymous 07/01/11(Fri)16:47 No.3316884
    >>3316852
    >High tech games
    >C
    Choose one-
    >> Anonymous 07/01/11(Fri)16:48 No.3316885
    >writing games in pure C

    the fuck you're all smoking

    1996 was 30 years ago.
    >> Lua 07/01/11(Fri)16:51 No.3316901
    sup fags, master race reporting in

    yall smalltime

    peace
    >> Anonymous 07/01/11(Fri)17:44 No.3317243
    >>3316042
    Only by greenspunning up a lisp.
    >> Anonymous 07/01/11(Fri)17:47 No.3317268
    Everything is written in C, some people just don't know it.
    >> Anonymous 07/01/11(Fri)18:59 No.3317857
    >>3317268
    I wish.
    >> Anonymous 07/01/11(Fri)19:03 No.3317887
    >>3316666
    Unless your language of choice is horrible (C++) you'd probably just write a crappy interpreter in a lower level language, then write a compiler in your own language, then compile your compiler.
    >> Scientist !!ThFjnJh4EkH 07/01/11(Fri)19:07 No.3317921
    >>3315627
    HTML is not a programming language.

    >>3315956
    Real games use both.

    >>3316570
    /sigh

    >>3316584
    OO does not mean abstraction. OO usually means dynamic dispatch, aka polymorphism. std::vector is an abstraction, but it is not OO.
    >> Anonymous 07/02/11(Sat)01:20 No.3319436
    bump
    >> Anonymous 07/02/11(Sat)06:19 No.3320296
    bump
    >> Anonymous 07/02/11(Sat)08:32 No.3320570
         File1309609954.jpg-(15 KB, 450x337, should have used C.jpg)
    15 KB
    blimp bump
    >> Anonymous 07/02/11(Sat)09:17 No.3320656
    I want to make vidya.

    Would it be smart to just skip c++ and go straight to c for simplicities sake?

    I dont give a fuck about OO.
    >> Anonymous 07/02/11(Sat)09:20 No.3320663
    >>3320656

    Video games are being programmed in C#....get with the times son.
    >> Anonymous 07/02/11(Sat)09:21 No.3320667
    >>3320656

    By the way, OO is your friend, not your enemy.

    Spaghetti code is not the way to go. It's the first sign that you are a n00b programmer.
    >> Anonymous 07/02/11(Sat)09:22 No.3320672
    >>3320663
    >c#

    No cross platform and im definitely not going to use that piece of shit XNA

    So wanna answer my question, is it a good idea?
    Do all the libraries Im gonna need exist for plain C aswell?
    >> Anonymous 07/02/11(Sat)09:23 No.3320678
    >>3320667

    I actually like spaghetti code. It makes me feel at home.

    If its too neat then its boring
    >> Anonymous 07/02/11(Sat)09:23 No.3320679
    >>3314031

    i = 10 //* lolol */ 2;

    C: i == 5
    C++: i == 10



    [Return]
    Delete Post [File Only]
    Password
    Style [Yotsuba | Yotsuba B | Futaba | Burichan]