[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

C++

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 252
Thread images: 19

File: BjarneStroustrup.jpg (41KB, 432x324px) Image search: [Google]
BjarneStroustrup.jpg
41KB, 432x324px
Without using memes, can you tell me what's the point of other languages when C++ exists?
Sure, Python is nice to write a fast script, etc. and Javascript is nice for making text blink on a website.
But when it comes to serious applications, how can other languages even compete?
>>
I mean serious development.
C++ gives the dev such power that it's scary.
And all the good video games are written in C++ as well, except meme phone games.
>>
Interpreted C++ sounds like an idea only a Wangblower may have.
>>
LOL in 2016 people still worry about C++? Faggots. Use ASM.
>>
>>55980206
>C++ gives the dev such power that it's scary.
This is the problem, OP. You can't just sit 200 code monkeys and ask them to write in C++, because the result will be a mess. Java, C# and other "enterprise" languages have the tools to control coders.
>>
>>55980182
>>55980206
>"What's the point of hammers? You can just use this wreckingball and drop it on top of anything!"
>>
Rust
/thread
>>
>>55980182
>Javascript is nice for making text blink on a website.
JS has been on the desktop and in the back-end for God knows how long. Keep up with the times, gramps.
>>
>>55980358
>le each programming language serves a purpose meme
>>
>>55980383
He said that JS is nice for making text blink. He didn't say that's all its used for, just all its nice for.

>>55980378
>/threading yourself
>meme language

>>55980332
This is the one true answer.
>>
>>55980378
meme/10
>>
>>55980182
>C for low level stuff
>C++ for higher levels
>Python for scripting
The best combination
>>
>>55980378
this
>>
>>55980699
C++ is used for embedded development and you get performance as good as C with stronger type and memory guarantees.
>>
>>55980852
you really cant say c++ for embedded devices. say c++98. which is just c with objects really.
>>
>>55980182
assembly for really low level stuff
javascript for literally the rest
perfection
>>
>>55980182
Because you don't write code into a language, you write code *in* a language. In other words, when you start a new project, you choose the best tool for the job based on a myriad of contending constraints and requirements: maintainability, extensibility, robustness, security, speed, size... You can't get all of them, there are always going to be trade-offs. Now, there are programming languages that by design put more emphasis in some of these properties and less so on the rest.

For instance, C is big on performance. Python is big on readability and flexibility. C#/Java are big on robustness and stability.

Picking the right language will also help convey your ideas better and implement your algorithms in a way that seems natural for the task at hand.

Solving certain problems in Lisp or Haskell may be easier and take less work than doing the same in C++. Conversely, complex applications with really high performance requirements can be tackled efficiently in C++.

Going against these principles by relying on personal beliefs or what other people have told you is cool or "how a real programmer works" is going to make your life much harder. You need to be eclectic when deciding on the technologies you use and certainly C++ is no silver bullet.
>>
>>55980182
>what's the point of other languages when C++ exists?

- Development time and ease of development (Python, PHP, JavaScript, ...)

- Code correctness (Ada, Eiffel, Haskell, Clojure, Scala ...)

- Portable assembly for lightweight/minimal footprint embedded stuff (C, Fortran, ...)

- Powerful frameworks and libraries (C#, Java, Python ...)

Sure, you can program anything in C++ if you want, just like you can use assembly for everything or even BASIC. It's just that writing a web service in C++ might not be the best use of your time.
>>
>>55981220
- Development time and ease of development (rust)
- Code correctness (rust)
- Portable assembly for lightweight/minimal footprint embedded stuff (rust)
- Powerful frameworks and libraries (rust)
Plebs not allowed.
>>
>>55981200
as someone who knows his shit in c++, i'd definitely rather use one of the hundreds of available c++ frameworks to get a webservice running than spend one minute with php, configuring apache, coding java, etc..
>>
>>55981284
While I guess you could argue the first three for Rust (even though most language purists would kill you for claiming that Rust has built-in code correctness), claiming that it has powerful frameworks and third-party libraries is just ridiculous.

The adoption of Rust for projects is minuscule, and by the state of things it appears to become the 2010 version of the D programming language; neat, well-designed, potentially powerful and a total absence of any community at all.
>>
>>55981298
>as someone who only knows c++
FTFY

I've worked as a web developer where we used C++ and one of those "hundreds of available" FastCGI frameworks...

If I'm ever going to do web dev again (which is not very likely), I will definitively use Python+flask or node.js something like that.
>>
C++ is big and fast, but also very hard. You can write almost anything on it, but it will require: 1. A lot of experience
2. A lot of development time
And the final product will probably be bugged, unless you're real expert.
So i wouldn't use it unless i need to make something serious that needs to be stable and reliable ( banking system)
>>
>>55981609
You should never use C++ for something that needs to be stable or reliable (as opposed to fast and light). That's also why banking systems use haskell or ocaml.
>>
File: Girls.png (490KB, 449x401px) Image search: [Google]
Girls.png
490KB, 449x401px
>>55981663
>That's also why banking systems use haskell
>>
>>55981663
>banking systems use haskell or ocamle
They certainly don't.

They use COBOL (old systems) and Java (for everything that's new).

There are even COBOL bindings for Java made especially because of new applications needing to interface with these old banking systems.
>>
>>55981663
what the fuck are you on about?
>>
File: really.gif (336KB, 200x200px) Image search: [Google]
really.gif
336KB, 200x200px
>>55981663
>banking systems use haskell or ocaml.
I know OP said no memes, but this is so unbelievably stupid it still warrants a reaction pic.
>>
>>55981765
>>55981758
>>55981744
>>55981743
>ABN AMRO, Bank of America, Barclays Capital Quantitative Analytics Group, Credit Suisse, Deutsche Bank, Standard Chartered, bloomberg, and jane street don't exist
Nice meme, I like it, say it again.
>>
>>55981863
>implying these only use Haskell and/or OCaml
>implying these don't use a multiple of languages
>implying any of them use Haskell or OCaml at all

http://www.indeed.com/q-Cobol-Banking-jobs.html
>>
>>55980182
While there are languages that fit the same niche as c++, some that I think are better, they aren't as popular. For the most part, people just like to be different so they prefer different tools.
>>
>>55981895
I can't even see the goalposts anymore at this point. The strawman looks nice though. Don't think he'll scare too many crows however.
>>
>>55981863
>source: my ass
good luck finding a bank willing to expose their technology stack in the first place
>>
>>55981609
>1. A lot of experience
This is true, your average code monkey will easily get lost in huge c++ projects
>2. A lot of development time
This is not true.
>And the final product will probably be bugged, unless you're real expert.
Its certainly easier for an idiot to write stable java code than it is for said idiot to write stable c++ code. However once you truly grasp the concept of programming a machine, many things become incredibly simple and intuitive in c & c++, while features such as garbage collection or script interpretation seem like training wheels for kids.
>>
>>55982287
Is that why nobody has ever been able to write a non-trivial c or c++ program without a half dozen memory-related critical bugs? Guess you must be an IQ 9999 genius never before seen, our salvation and the only person in the world able to program in c++. Everyone else but you is an idiot.
>>
>>55981150
gcc supports C++14 on AVR and ARM. And even if you're stuck with C++98, you still have templates which work way better than raw C macros.
>>
>>55981284
>mememan choice
>>
>>55980500
>le everything I don't agree with is a meme meme
>>
>>55982723
>is that why nobody has ever been able to write a non-trivial c or c++ program without a half dozen memory-related critical bugs?
>/g/ consumer electronics board

>>55982799
no it doesnt. just some select features. and how could it? my current project's ARM core has less memory in total than the STL requires.
>>
The last job I had was C++ programmer and I got so fed up I wrote a brainfuck converter and had all my source files ported to brainfuck and delete the C++ originals before I left. Now they're stuck on 99% brainfuck. Joke's on you Bob, that's what you get for firing my ass.
>>
>>55983556
Watch out everybody, we've got a genius with quadruple-digits IQ in here! The only known person to have ever had the ability to write non-buggy c or c++! What a badass!
>>
File: 50a.jpg (18KB, 341x234px) Image search: [Google]
50a.jpg
18KB, 341x234px
>Forget ampersand
>Have to increase terminal scroll history to 2048 lines and compile again to even see what error you got before the 1800 lines of template garbage

cuck language
>>
>>55981609
you really think you need c++ for a banking system
>>
>>55983751
you dont need to be genius to write good code, but you must not be an idiot either. thats what i said. seeing you fall into the latter category of people i can forgive you for not understanding me.
>>
>>55981298
> C++ and web in the same sentence
oh god my sides
>>
>>55982723
>Is that why nobody has ever been able to write a non-trivial c or c++ program without a half dozen memory-related critical bugs?

Considering that just about all VMs are written in C++ or C, it implies that all managed language runtimes have critical memory bugs. On the other hand, I mange a code base of about 3 mil LOCs. Most of it in c++ with legacy 20 year old mfc code. This code has _zero_ known memory related issues that are not because some moron decied to use stdc or MFC. There are 500k automatic tests running this code 24/7 with approx 95% coverage.

With RAII and smart resource handles it is almost certain that a resource is going to be freed. Which is unlike in managed languages in which sockets, db connections and other resources are often left hanging because most code monkeys do not understand that a resource taken must be freed.
>>
>>55983830
Don't write garbage. Alternatively. Don't use heavy template libraries ( boost bind/spirit/phoenix come to mind ).
>>
>>55983957
not every website is solely dedicated to the exchange of inane comments and memes. some are actual interfaces to machines so c++ makes sense instead of adding 3 layers of garbage just to connect a virtual button to some i/o pins. ofcourse in your own small world industries use rust and whatnot instead of c++.
>>
File: 1455523221055.jpg (28KB, 259x215px) Image search: [Google]
1455523221055.jpg
28KB, 259x215px
>>55984018

>>55984018

>Don't write garbage.

What a compelling argument, I really see why C++ is a good language, your well thought out comment showed me the error of my ways.
>>
>>55983830
Or you could stop at the first error.
>>
>>55984133
What can I say. It takes effort to see 1800 lines of template compile error. BTW, there are pretty printers for that shit for all major compilers.
>>
>>55983954
Watch out guys, the only person in the universe capable of writing c/c++ code just called carmack and ritchie 'idiots'! Can't wait to see in what genius ways he's going to revolutionize our world guys!
>>
>>55984019
Rust is literally everything C++ wished it was and more. C++ dreams of being as suitable for embedded work as rust. C++ dreams of being as safe as rust. C++ dreams of being as powerful as rust. C++ dreams of being as small as rust.
>>
>>55984180
If they can't manage their memory in c++, they are idiots, at least in this regard.
>>
>>55984217
>rust is the first of its kind
Hello millennial
>>
>>55983556
You can write C++ without using the STL.
Besides, there are a couple of C++98 compatible implementations of the STL aimed at embedded systems.
>>
>>55984255
t. inbred
>>
>>55984494
You're right, I'm sorry I made fun of your favorite language that reinvents the wheel
>>
>>55984587
t. inbred
>>
>>55984217
>Rust is literally everything C++ wished it was and more. C++ dreams of being as suitable for embedded work as rust. C++ dreams of being as safe as rust. C++ dreams of being as powerful as rust. C++ dreams of being as small as rust.
We had this debate 20 years ago, except the latest fad back then was called D.

Face it weirdos, Rust is going nowhere. At least Go has a growing community.
>>
just use Go
>>
>>55984620
Thanks for the chuckle
>>
>>55980182
once you leave your mom's basement and enter the professional you start to realize a couple of things.

first, developer time is infinitely more valuable than CPU time. this should go without saying. second, performance is a minor concern in applications that are not performance-critical.

this means sacrificing perf for abstractions that make development faster and less error prone becomes a very good idea. this includes garbage collection, light threads (or whatever your favorite implementation is called), dynamic typing (or type inference), exception handling and countless other things that necessitate or are made easier by a runtime of sorts.

now, this would make foregoing C++ a good idea even if it wasn't pretty bad itself. you see, the spec is getting pretty damn convoluted. some of the more modern stuff is extremely hard to implement, which makes compilers much larger, slower and error prone.

there are many features that are standard fare in modern languages (like easy concurrency a la Golang) that are a total pain in the ass to pull off in C++ since it was designed before those things became popular.

it's also possible to create extremely fast binaries with languages that enforce memory safety and provide garbage collection, like Rust.

this, coupled with the fact that the aforementioned languages have MUCH better standard libraries makes me wonder why anyone would pick C++ for a new project in 2016.
>>
>>55983994
>a code base of about 3 mil LOCs
>LOCs
>lines of codes
>>
>>55983994
>Which is unlike in managed languages in which sockets, db connections and other resources are often left hanging because most code monkeys do not understand that a resource taken must be freed.
usually frameworks handle this kind of shit automatically for you

it's 2016, grandpa, wake up
>>
>>55984737
>why anyone would pick C++ for a new project in 2016
Qt.
>>
>>55983994
>There are 500k automatic tests running this code
do you mean unit tests? those only run at build time, not 24/7
because I refuse to believe that you have 500k automatic external integration tests

if you actually do, then how the fuck? what testing framework, senpai?
>>
>>55984924
>Qt
>new

Qt is a necessary evil, not something you should use as a model
>>
>>55980182

>not knowing about React Native

JS has come a long way. All depends on the project.
>>
>>55984737
>performance is a minor concern in applications that are not performance-critical
and how common are those applications?

other than jobs/processes running by themselves in the background, I can't really think of any
if there is direct user involvement, performance is gonna be important
>>
>>55983994
>thinking knowns bugs/memory issues means that there are no failures
>thinking code coverage means shit
>>
>>55985033
literally 99% of the code in existence is not performance critical to the extent you think.

Unless you're writing operating systems, embedded devices or hard real-time systems, you can get away with almost everything. Even soft real-time systems can be implemented in a higher level language, like Erlang
>>
>>55984737
>first, developer time is infinitely more valuable than CPU time. this should go without saying. second, performance is a minor concern in applications that are not performance-critical.

Language choice is, literally, irrelevant. Developers spend 90% of their time doing jack-shit. That being - thinking of how to solve issues. Actual implementation takes a minute amount of time.

If you have a properely trained programmers, then they will be capable to switch from whatever language to whatever else. I routinely switch between C++ and legacy perl code. If need be, I'll be proficient in "language of the day" within a month.
>>
>>55984641
My fucking sides!
>>
>>55983830
>Using terminal scroll history
>not output redirection

Lol
>>
>>55984890
> usually frameworks handle this kind of shit automatically for you
> "Why does my Java runtime eats 10 gigs of memory"

"automatically" does not mean "optimally".
>>
>>55984967
Unit tests are another issue, they are run either in debug mode, inlined into the actual code, or during continous integration, depending on the product.

We have a custom build farm of a few hundread machines which run all the integration tests and userspace scripts. When devs leave the office, their machines are seamlessly integrated into this network, doubling its capacity at peak times.
>>
>>55980699
>C
>low level
kys famalan
>>
>>55984995
says who.
Qt interfaces look modern and are quickly done with little to no effort. it adds every feature to c++ which it lacks compared to java (networking, printing, ..), and the framework really keeps its promise when it says develop once deploy everywhere.
>>
>>55985291
Are you clinically retarded or merely a shill?
>>
>>55985318
poor java fish
>>
>>55985291
>Qt interfaces look modern and are quickly done with little to no effort.
So does HTML5+CSS UI frameworks.

The Qt programming model is still pain to work with due to a bunch of horrible design decisions first made by Trolltech and then later Nokia.

>develop once deploy everywhere.
There's a reason why this is often referred to as "write once crash everywhere"
>>
>>55980332
>>55981609
>>55981663
>>55982723
>>55983751
>you shouldn't use c++ because its hard
>you shouldn't use c++ because people are incompetent
stop hiring retards then. sure c++ doesn't work everywhere im not about to say that you should c++ for shit like web development like some autistic retards here but if you dont use c++ just because you'll fuck up maybe you're the problem.
>>
>>55985755
According to your standards, there isn't a single person in the history of humanity that has ever been competent.
>>
>>55980557
JS is nice on desktop and on the server side.
>>
>>55985755
>sure c++ doesn't work everywhere

and yet:

>can you tell me what's the point of other languages when C++ exists?

???????
>>
>>55980182
Would you build a Hotel out of microbeads? Would you build a phone of out cement bricks?
>>
>>55980290
Kek
>>
>>55981169
>write a game in javascript
>computer lights on fire
>>
>>55985290
>kys
>famalam
read a book on social interaction autist
>>
>>55980182
>Without using memes, can you tell me what's the point of other languages when C++ exists?
It's been proven, time and again, that humans suck at memory management, therefore we need languages that are memory safe.
>>
File: 1448408388301.gif (453KB, 352x239px) Image search: [Google]
1448408388301.gif
453KB, 352x239px
>>55981933
>I cant even see buzzword anymore. The other buzzword looks nice though.
>>
>>55984924
I LOVE QT
>>
>>55984217
Meme languages come and go. A few years back everyone thought Perl would be the next big thing. C, C++, and Java have stood the test of time.
>>
>>55985290
C is about as low as it gets below assembly
>>
C++ is on suicide watch. There's really no need to use it for new projects any more. Bjarne pls go
>>
>>55986741
What you said makes literally no sense
kys
>>
Old fag here . Deciding to learn to python. Does 4Chan recommend it or should I learn something else.
>>
>>55988252
How many times per day were you dropped on the head as a kid?
>>
>>55988420
Plenty
>>
>>55988252
People should start adding C# to that list. And to my chagrin PHP and JS too.

>C#
>based Mono
>>
>>55988372
You don't learn languages for the sake of learning a language, you complete projects. In this process, you need to learn what you *actually* need to know of the language in addition to supplementary frameworks, libraries, programming paradigms, etc. Then go back and figure out how you can incrementally improve the code quality. Repeat until you can complete projects in said domain.
>>
>>55987092
>social interaction etiquette
>on an anime forum
take your own advice you literal retard
>>
>>55985237
what the fuck are you on about?
any framework worth using is not going to do that

stacking try-finally blocks isn't difficult in the first place
>>
>>55980699
>inline assembly for cpu level optimization
>C for low level stuff
>C++ for better maintenance and readability
>LUA for scripting

FIXOR'D
>>
File: 1455501026034.jpg (7KB, 200x200px) Image search: [Google]
1455501026034.jpg
7KB, 200x200px
OP is right. C++ truly is the greatest language of all time.

http://harmful.cat-v.org/software/c++/I_did_it_for_you_all

>Remember the length of the average-sized ‘C’ project? About 6 months. Not nearly long enough for a guy with a wife and kids to earn enough to have a decent standard of living. Take the same project, design it in C++ and what do you get? I’ll tell you. One to two years. Isn’t that great? All that job security, just through one mistake of judgment.

Can any other language provide such excellent job security?
>>
You will rarely find someone that can even function at the analogical level and you're expecting them to do more than short process applications? Basically because C++ has a limited import. You get structures but the interface programming isn't carrying the program as they would like it which means a lot of anxieties about something very modular. Mostly due to blinking text on the screen, though.
>>
>>55990473
"finally" is not RAII. Giving away responsibility for resource freeing to the runtime in some cases might mean it will be freed "later". For example, two days later.
>>
>>55986707
I'm not op you retard
>>
>>55986196
>no one has ever made a good c++ program
what
>>
>>55988252
>A few years back everyone thought Perl would be the next big thing.
Perl was old ten years ago
>>
>>55980290
I know, right? Like, this is $CURRENT_YEAR, it's damn time we all wrote code on punch cards instead of this archaic garbage.
>>
>>55984217
Do you at least get paid for all this shilling? Oh never mind, Starbucks baristas don't make enough to afford to pay for shills.
>>
>>55988372
>Old fag here .
>4Chan
>C
does not compute
>>
C++ will not be replaced, no matter what you do. As long as gcc and LLVM (which are supported by academics) exist and have extremely well optimizers for C/C++ code, you can't replace C++. All those researches are specifically implemented in their optimizers (same goes for Intel C Compiler and MS compiler actually). C/C++ code is heavily optimized by compilers, supported in embedded systems and everything unix-related.
>>
>>55980182

Other languages exist that are better designed and smaller than C++ which make them more suitable for development in a specific are than C++. Sure you can practically do everything in that language but you have to manage all the complexity, multiple ways to do X, and numerous "gotchas" that shouldn't exist.

The main problem with C++ is maintaining a face value compatibility with C, IMO. Look at the draft proposal to "rebase" the C standard library reference in C++17 to C11.

http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0063r2.html

Yet, some of the most useful features from even C99 has yet to make it into C++ like designated initializers, flexible array members, restrict keyword, anonymous structs, etc.

I have no clue what kind of subset of C C++ is trying to be compatible with but it is not in any way useful at all IMO, coming from someone that had to develop in this subset for some asinine reason. Just get rid of any semblance of compatibility so you can get rid of all the ugly things C is doing to C++ without any of the advantages.
>>
File: common lisp disassemble to asm.png (47KB, 851x779px) Image search: [Google]
common lisp disassemble to asm.png
47KB, 851x779px
>>55980182
C++ is just another domain specific language or DSL. The correct question is: why does any other language than Common Lisp exist?

Now you might think it's too high level. No it's not. You can implement C++ in Common Lisp, but not the other way around. C++ doesn't have equivalent expression power because its code is not directly mappable as data structure.

Pic related is what I discovered yesterday and it blew my mind. In case you are total goof, what you see here is Common Lisp code disassembled to Assembly on the fly. I could tweak individual pokes on processor register level. Let that sink in for a moment.
>>
>>55991435
>why do domain-specific languages exist?
because domains exist you asshole
>>
>>55981200
/thread
>>
I saw a "modern guide to C" floating around the other day (pointing out modern C finally allows for Int's to be declared within the first expression of a For loop), but is there an equivalent one for C++14/17? Feels like 90% of practical shit links to Stack Overflow pages from 2008-2012 under C++11 or so.
>>
>>55991465
No they don't. Every "domain" simply pushes data around in one form or another. There is no concrete difference between backend and game programming.
>>
>>55991498
nigga please. a language designed to suit a specific purpose can always achieve that purpose more efficiently (in definition, not necessarily implementation) than a language designed to meet any purpose. mind explaining how that's possible if domains don't exist? just because it isn't simple doesn't mean it isn't concrete
>>
>>55980378
>wanted to try Rust
>check out the official webpage
>HELLO RUSTACEANS!!!!!

Fucking dropped
>>
>>55991603
Very professional, truly the language of the future
>>
>>55980182
Money nigga

>Fortran
I'm being paid by the local University's math department

>Python
I'm being paid by a research assistant that needs a glorified calculator

>COBOL
I'm being paid by the local bank

>Any language
I'm being paid
>>
C competes by not being a clusterfuck.
>>
>>55991586
You imply languages are designed to solve specific problems in specific domain. That's good assumption but false. For example what domain did Guido van Rossum design Python for?
>>
>>55991704
The retard domain
>>
>>55980208
ROOT
>>
>>55991704
i didn't say that. in fact i didn't even say i was talking specifically about programming languages, because i wasn't. i said that domain-specific languages are more efficient in their domain. i didn't say that all languages are domain-specific, and i didn't say that all existing language implementations target a well-defined specific domain, because not all of them are/do and because that's entirely irrelevant
>>
File: shiggydiggy.png (21KB, 431x696px) Image search: [Google]
shiggydiggy.png
21KB, 431x696px
>>55980182
because of pic related
>>
>>55980332
...and you don't use version control because?
>>
>>55991826
Job security my friend
>>
>>55991603
It's still better than calling themselves RUSTafarians.
>>
>>55991435
if CL can't be implemented in C++ why not? afaik C++ compiles down to native machine code.
>>
>>55991810
You don't make any sense.
>>
>>55991826
The implication here is that all solutions are equal, and all implementations of that solution can be scaled equally over time.

Sometimes it's better to choose to invest in what's initially just overhead.
>>
>>55991826
nice source faggot

>>55991896
wrong word, meant C++ as a language can't do what Lisp can do, that is, extend itself on fundamental level. lacks expression. implementing trivial Lisp is actually easy.
>>
>>55992030
ah ok. is lisp compiled to native code or does it use some kind of interpreter?
>>
>>55980182
>Javascript for blinking text
>OP confirmed for so stupid he doesn't know what <blink> is
C fags in a nutshell.

Why would you program in anything that isn't DeviousYarn or Fortran?
>>
>>55992030
>C++ as a language can't do what Lisp can do, that is, extend itself on fundamental level. lacks expression
But operator overloading and lambda functions can somehow actually do that, you can even overload the "()" operator make objects act like functions (functors), thus giving the possibility to use C++ as a functional language. Not that I recommend it, though. C++ has a tendency to include every paradigm and implement them in the most broken ways. It definitely doesn't hold the simplicity of Lisp.
>>
>>55987092
kowai senpai
>>
>>55992061
Depends on implementation. SBCL does it all. You can simply run lisp file, compile it into fasl or compile entire program into self-containing Lisp image.

>>55992139
As can templates afaik in C++14. I'm not really exactly sure what the capabilities are, but they simply can't be as good as lisps unless C++ becomes homoiconic.
>>
File: op is constantly faggot.png (84KB, 552x595px) Image search: [Google]
op is constantly faggot.png
84KB, 552x595px
>>55980182
>Javascript is nice for making text blink
>>
File: mansplain.jpg (89KB, 1015x550px) Image search: [Google]
mansplain.jpg
89KB, 1015x550px
>>55991207
He did call himself an "old fag", not oldfag. So the opposite of young fag rather than newfag. Your assignment is to make a fag detection program in C++.
>>
>>55980182
programmers are dumb so they prefer garbage collection to catch their shitty mistakes - that's basically why most languages exist today.
>>
>>55991826
>30 lines per hour

Christ, people are retarded
>>
Because C exists
>>
File: 1349166495758.jpg (39KB, 848x480px) Image search: [Google]
1349166495758.jpg
39KB, 848x480px
>>55980182
It's a great language but not that easy to use properly. Some languages have been built to implement what C++ is lacking, but at the cost of flexibility.
>>
>>55992836
I FUCKING HATED ENDLESS 8 SO MUCH I FUCKING GAVE THE FUCK UP
>>
>>55980182
C++ is a horribly designed language. People mock Java for "one class - one file", but if you follow the C++ guidelines you end up with TWO files per class. Headers concept results in unacceptably long compilation times, it doesn't help that the very syntax of C++ is ambiguous(look up the most vexing parse). Function prototypes shouldn't even exist - why would functions depend on the order of their declaration(same goes for headers). And why have both headers AND namespaces? I could go on and on. Other languages usually have better syntax but are fundamentally flawed in some way.
>>
>>55992866
yeah but that anime was entry-level garbage anyway
>>
>>55991210
>nobody else can use gcc and llvm
(You)
>>
>>55991603
The community as a whole is SJW as shit and not worth even looking at. The language, on the other hand, is god-tier.
>>
>>55980182
Listen here you neet faggot, there's an easy way to solve problems and there's the C++ way to solve problems.

When you've worked in the industry and seen the glory of a simple codebase not littered with compiler arguments you'll understand why we use simpler languages. C++ is a dead language.

Try Golang for something powerful, simple and efficient.

Also, all games are scripted with lua, deal with it faggot
>>
>>55984730
t. inbred
>>
>>55984641
Fucking this
>>
>>55990693
>By the end of the interview, the interviewer got more than he had bargained for and, subsequently, the editor decided to suppress its contents, ‘for the good of the industry’ but, as with many of these things, there was a leak..

seems legit, brb writing a 'leak' myself debating the exact opposite

Interviewer: Do you still believe OP is a fag? Do you think homosexuality is still relevant in 1998?
Stroustrup: Actually, it seems there is *literally* no end in sight, OP is a massive dingleberry consummerist
>>
>>55992470
you know, it's not a matter of writing a fizzbuzz from scratch - maintaining applications and developing new features for them often result in lots of thought and not necessarily lots of code.
>>
>>55993851
>golang
>powerful
>when it's less powerful than C
>golang
>simple
>when it doesn't even accept any syntax so you have to use gofmt before compiling
>golang
>efficient
>when it's slower than java and has a forced GC
>>
>>55993999
Go is the idiot's way to do concurrency, there's no other widespread language which does it as easily. No wonder it's being used more and more by ex-Python babbies.

Still, a better choice than node.js
>>
>>55994106
Even that's arguable since at least node.js isn't going to make babby's first website leak more memory than their mums leak cum.
>>
>>55991756
is shit
>>
>>55994106
Tell me how's Go's concurrency easier than C#'s async.
>>
File: 05-10-38-1467664478340.jpg (52KB, 453x604px) Image search: [Google]
05-10-38-1467664478340.jpg
52KB, 453x604px
>>55980182
>C++ if I want perfomance or embedded
>C# if I want to make shit fast
>Asm if I want to reverse engineer something
>Python if I want quick scripts
I am all set, its comfy as heck
>>
>>55994373
>C++
>embedded
Confirmed for clueless.
>>
>>55994396
C++ is the more popular embedded language. But hey, I'm sure you're an expert on the subject, what with your wide experience working for Mom's Basement.
>>
>>55994396
>Confirmed for clueless.
>hurr i read a meme on the internet once so i am informed :^)
call me back when you've actually written a sophisticated firmware for a non-trivial amount of sensors on an embedded platform
>>
>>55994396
You sure provided us with a comprehensive and thorough argument.
>>
>>55994242
I don't know much of C#, but from what I see from documentation, there's a certain convention to follow in order to make your methods subjects to concurrency. There's no such semantics in Go, every function can be used either synchronously or asynchronously when needed. Awaiting mechanism in C# may be more straightforward than in Go, though.
>>
>>55994447
Damn, I wonder where area all those C++ compilers for controllers then...
For embedded you have exactly two choices: C and assembly. C++ is too big to easily implement a compiler for.
>>
>>55994491
>there's a certain convention to follow in order to make your methods subjects to concurrency.
Confirmed for clueless.
>>
>>55994526
I guess Mom's Basement isn't as hot a place to work as some people claim, huh.
>>
>>55994526
ever heard of gcc? what do you think g++-arm-eabi compiles? pascal?
>>
>>55994467
Call me when you can actually run a C++ code on your non-trivial system. Even those controllers that support C++(like Atmel) place such restrictions that you're better off using C.
>>
>>55994587
Well if you use CPUs for embedded and not controllers...
Might as well put an OS there and do everything in Python.
>>
>>55994593
Have you tried getting a brain?
>>
>>55994526
Are you living under a rock?

Some 8-bit and 16-bit controllers may be lacking of C++ compiler sure, but nowadays you can get 32-bit controllers for less than a dollar and are supported by mature C++ compilers.
>>
>>55994640
Ouch! Ten out of ten rebuttal. Considering there are people there counting Pi as an embedded platform you all really are clueless.
>>
>>55994625
controllers are CPU plus periphal controllers, so really what you said makes no sense.
even the goddamn HAL comes in c++ code for most MCUs, like the stm32. these are the kind of MCU that wont support any OS other than FreeRTOS maybe, depending on the model.
>>
File: humanretardation.gif (2MB, 257x300px) Image search: [Google]
humanretardation.gif
2MB, 257x300px
>>55994526
I would agree with you 15-20 years ago.
>>
My opinion of c++ is that it is an excellent first programming language of the family(python,java,...).
The use of all programming paradigms and manual memory management makes learning a language like python afterwards really really easy.
>>
>>55980182

>what's the point of other languages when C++ exists?

Languages are Tools. Can you put a Nail in the wall with a scewdriver? Of course! Is it a good idea? Probably not.

C++ is an incredible powerfull language, but it's syntax is outdated and was never really good.
You have way too many options to do things, that's why most large scale projects rather use C even it means you have to build stuff by yourself a lot of times.


Also - and I'm not using Memes here - Java is almost as fast as C++ today without all that messing arround with memory. C++ is more more concise than Java, but you can also create a much bigger mess.


Also it's not the 80s, Computers nowadays are so fast, all this benchmarking means not that much anymore.
If you safe 1 second for a programm and it takes twice as long to build it and is 10x harder to debug, then every sane person would pick the "slower" programm as the whole package is more convincing.


That said, C++ will probably never die because it's just great with stuff like graphics and low level optimization. If it wouldn't be such a mess more people would use it.
>>
>>55990504
/thread
>>
>>55990504

Whoa, you picked up Lua, grandpa, at your age?
>>
>>55980332
>what is git
DING DING DING!!!

>>55994526
Errr WRONG!
The spin 32 bit microcontroller uses a modified C++ compiler.
>>
>>55980206
>muh vydya
every tiem!
>>
Without using memes, can you tell me what's the point of other languages when Haskell exists?
Sure, C++ is a nice way to write a game engine in and C is nice if you are gay with men and love Linux, but when it comes to serious applications, how can other languages even compete?
>>
>>55994839
>powerfull
Stopped reading right there.
>>
>>55992975
>why would functions depend on the order of their declaration
Ever heard of high order functions,dumbass ?
>>
>>55996494
How many operating systems are written in Haskell?
>>
>>55996494
Without using memes, can you tell me what's the advantage of using Haskell over OOP languages?
>>
>>55981743
They write DSLs in Haskell and use OCaml to write compilers.
>>
>>55996563
Dozens.
>>
>>55996571
Any given F language is an OOP language as well.
OO monkeys just reinvented the wheel.
>>
Anything that might be wrong with C++ can be fixed by a coding standard.
And if a company doesn't have one, it only consist of a single guy anyway, so there shouldn't be a problem.

And no, it isn't just a spaces vs tabs thing.
>>
>>55993723
>The language, on the other hand, is god-tier.
The language is as bad as the community. It's supposed to replace C++? The templates are weird and underpowered, the macro system is too complicated to use, the syntax swaps shit around (types after variables, semicolons in array types, renaming "auto" to "let," renamed "switch" to "match," no ?:, no ++/--, forced braces in if/while statements) just to be special snowflakes.

But the worst part is the obsession with safety. That's an SJW way of thinking, and the language forces it on you. Did you think it's an accident that the SJWs picked this language to flock to? It's not. It's part of their agenda to convert people. If you use Rust, you're being converted.
>>
>>55996494
Haskell cannot work without a GC and is kinda slow. However, the same reason why GCs aren't good is why haskell, even if it had a GC, would not be good: non-determinism of resource requirement and timings. The thing is that haskell being lazy by default fucks up reasoning about program system requirements completely which is unacceptable in all but the most pointless cases.

Not to mention that forced referential purity is a huge hurdle for a lot of applications and that in practice even haskellfags end up bypassing it using things like lenses (which aren't good enough either, but at least better than nothing) because even they realize, deep down, that it's stupid.
>>
>>55996731
The templates are exactly as powerful as C++'s and work in the same way except without boilerplate, e.g. instead of template<typename T> something something { T t etc. }, it's simply something something<T> { T t etc. }. Thus, this point goes into the trash.
The macro system is as simple as scheme's (it's also the same as opendylan's - i.e. it's the translation of the scheme macro system to infix, typed languages). If you think that's complicated, your entire opinion belongs in the trash.
The fact that you think that C syntax is a good point of C++ is pathetic and shows that you either have no clue what you're saying or aren't trying to argue in good faith at all.
If you think complete syntax determinism is "being a special snowflake" you need to get a brain somewhere. Try the bargain bin, it can only be an upgrade.
If you think goto fail and heartbleed are good things, you are not fit to be anywhere near any computerized device in any way. Consequently, discontinue visiting 4chan immediately.
>>
>>55996851
>is kinda slow
Haskell is faster than C most of the time.
It's slower than OCaml though.
G!
It's like you faggots spend too much time on this board that you forgot to learn the actual programming languages you are discussing here.
>GCs aren't good
What is this? 1969?
And why plural? Computer illiterate much?
>even if it had a GC
It does have garbage collection, idiot
>haskell being lazy by default fucks up reasoning about program system requirements
Where have you read any of this?
You're wrong. You're fucking wrong.
You really don't know what on Earth you are talking about, do you?
>>
>>55996917
>The templates are exactly as powerful as C++'s and work in the same way except without boilerplate, e.g. instead of template<typename T> something something { T t etc. }, it's simply something something<T> { T t etc. }. Thus, this point goes into the trash.
Your post goes into the trash. C++ lets you have numbers in a template. Rust doesn't. You don't seem to know this? Why sould I bother reading the rest.
>>
>>
>>55996941
>Haskell is faster than C most of the time.
Stopped reading here.
>>
>>55997000
Oh the irony.
>>
>>55980182
>C++
>not Go
>or D
>or hell even C#
>not even C

Get the fuck out
There's a thousand languages better created and easier to use than C++, if you really need C use fucking C, if you don't need C use something else so long as it's not Java, why the fuck bother with C++?
>>
>2016
>Not using the right tool for the right job.

>>55984737
>developer time is infinitely more valuable than CPU time

Basically this. In the real word, time is more valuable than anything else, so, a good engineer will pick what best fir the job to be done.

Everyone shits on angularJs, but, in my experience, if you know what are you doing, you can do amazing things, in little to no time without sacrificing performance.
>>
Everyone is arguing about how shit C++ is. Ada is waiting for you. Think of it as rust, but not headed by sjws and faggots.
>>
>>55996571
You can do the maths really fast in Haskell
>>
>>55997130
All of them are about 5 orders of magnitude worse than C++ in every aspect.
>>
>>55997158
t. retard
>>
>>55980182
>can you tell me what's the point of other languages when C++ exists?

C++ is hideous. It started getting better with C++11 (or 0x, I can't remember), but it's still awful. You're beholden to a standards committee that spends all its time obsessing over its own particular language fetishes, refusing to introduce any new keywords for fear of requiring someone with a 20 year old codebase to rename a fucking variable, and they overload shit to a ridiculous degree.

Modern C++ is just a joke of language lawyering, as far as I'm concerned. I'd rather take the responsibility for looking after manual allocations in C than acting like a machine deciding between unique_ptr and shared_ptr.

The language itself is convoluted and extremely hard to parse. This resulted in a few years of having to write "std::vector<std::list<int> >" because the compiler couldn't differentiate between right shift and closing two template expressions. It also leads to long compile times, which become ludicrous on really big projects.

C++ in 2014 was what C++ should have been in 1996 when it had its heyday.

STL didn't have a hash map until some ridiculously late year. Oh, and STL didn't even work properly in a cross-platform, universal way until well into the 2000s. That's ridiculous. And even now, you get horrendous compiler errors when working with templates.

BTW I was a professional C++ programmer from 1996 - 2013.
>>
>>55984018
>Don't write garbage.

Irrelevant. Make one tiny mistake and you get a flood of errors. The error message will strip the syntax down to its root elements rather than presenting the friendly typedefs that you're actually using. It's awful.

Back in the day, we had to use a perl script called from Visual Studio to parse and reduce STL (possibly STLPort) error messages. They were absurdly long and redundant.

> Alternatively. Don't use heavy template libraries ( boost bind/spirit/phoenix come to mind ).

Ah, yes, just don't exploit the power of the platform. Spend your time rolling your own while the jackass at the next desk gets a fat bonus for the super-useful and pretty server monitor he wrote in Javascript yesterday.
>>
>>55997130
Typical memeing summerfag right here gentlemen.
>>
File: 1457612044412.png (66KB, 1000x1000px) Image search: [Google]
1457612044412.png
66KB, 1000x1000px
>>55997145
Is that all?
>>
>>55997141
>garbage syntax
>GC by standard, manual memory management otherwise
>no functional features
>no real ML-style destructuring patterns
>no compiler plugins
>no hygienic macros
>fat as shit compiled binaries
>slow
"No".
>>
>>55997217
>because the compiler couldn't differentiate between right shift and closing two template expressions.
Hah
>>
>>55997294

No, he's right. There's no good reason to be using C++ in 2016.

C# is a better language, by far. Java is probably better, though the developers-are-interchangeable-cogs Enterprise Design Patterns bullshit sort of ruins it. C is an extremely sharp, compact knife that perfectly solves the problems of embedded software and drivers. Javascript is terribly flawed in a few ways, but arguably the most powerful language on Earth (in terms of how much you can get done and across so many different roles and machines). Python and Ruby are easier to get started in and have a higher payoff per unit of time invested.
>>
>>55993711
the optimizer won't be focused on other languages. it's c/c++ mainly.
>>
>>55997319
GC isn't standard you mongoloid and it's just as fast as c++ because guess what, you can use gcc.
>>
>>55997402
GC is literally in the ada standard and it's nowhere near as fast as C++. Also manual memory management is deprecated even when GC is not in use.
>>
>>55997335
>look ma, I learned how to write hello world in javascript yesterday!
>>
>>55997716

If you want to have a conversation, we can. But all you've done is write incomprehensible snark that leads nowhere.

I honestly have no idea what point you're trying to make. You're like an angry toddler smearing his shit on the walls.
>>
>>55997335
>No, he's right. There's no good reason to be using C++ in 2016.
Yes there is: You need your program to go fast. If that's a requirement, you have no other options.
>>
>>55997699
GC is allowed in the standard but not mandatory. No mainstream Ada compiler uses a GC. Also what the fuck does "manual memory management is deprecated" even mean. Are you saying unchecked _deallocation is deprecated?
>>
>>55997284
>one tiny mistake
So don't make mistakes.
>>
>>55997885
Ada, rust, clean, haskell, ocaml, SBCL
>>
>>55980182
As shitty as it is in many, many ways, C++ is still the only viable language for a lot of development problems since it's the only one with all of:

> compiled
> no GC, from the very beginning (looking at your bullshit here, D)
> can express variety of programming constructs without relying on ad-hoc preprocessor duct tape and baling wire
> non-pitiful user base and library support

That said, C++11 was when the language quit being completely mangled shit, and it still lacks a lot of fundamental stuff like Modules, Concepts, etc.
>>
>>55997885

>You need your program to go fast. If that's a requirement, you have no other options.

Ugh. That's a fat paint brush you're using there, bud.

If you need your program to go fast, you should be using C. It's too easy to unwittingly invoke excessive code with OOP.

If you're willing to trade some speed for far better maintainability and project management, then C# will suit you well.

>>55997906
>So don't make mistakes.

More worthless commentary. If you believe this is reasonable, then you have only worked on babby programs in your spare time. Let me know how that philosophy works for you on your 70th hour of work during a last-minute deathmarch project that determines the fate of your company.
>>
>>55996635
Which ones?
>>
>>55997937
>More worthless commentary. If you believe this is reasonable, then you have only worked on babby programs in your spare time. Let me know how that philosophy works for you on your 70th hour of work during a last-minute deathmarch project that determines the fate of your company.
Mistakes are bound to happen in any complex project, but it's silly to expect the compiler to run properly when you give it invalid input
>>
>>55997927
There are metric fucktons of languages that fit these criteria. You need to change point 4 to "massive userbase and library support" to actually have a point.
>>
>>55997982
How come no other language's compiler has that issue? Checkmate underageb&.
>>
File: 1467546567669.jpg (26KB, 285x281px) Image search: [Google]
1467546567669.jpg
26KB, 285x281px
>>55980182
>write a program in C
>eveerything is straightforward, able to predict what everything will compile down to
>write equivalent program in C++
>look at assembly output
>vomit
>>
>>55998001
it all depends on where you put the cutoff for no longer being pitifully small.
>>
>>55997982
>but it's silly to expect the compiler to run properly when you give it invalid input

1) What do you mean "compiler to run properly"?

2) Where did you get the idea that I "expect the compiler to run properly" when I've given it invalid input?

I gather you're ESL, but Jesus, what a worthless shitpost you've written.

You want an example, though? Well, let me explain what was already mentioned earlier: why does the compiler spit out the most basic types? Why doesn't it use the typedefs that my code uses? I understand this would be an additional lookup, but it would be WELL worth the effort. It's particularly horrendous when using heavily templated libraries like STL. An innocuous typo can lead to absolutely insane error messages. That's a ton of fucking cognitive load for a simple error.
>>
>>55998149
Use a better compiler.

It's not the language's fault.
>>
>>55998067
Be the change you want to see in the world sheep
>>
>>55998679
This. A language isn't going to get users if you're not using the language because it doesn't have users. Of course, don't use a language without a web framework to make web stuff, and nobody expects you to one-man a state-of-the-art 3D game engine, but you can use practically anything for 90% of scripting tasks, about 70% of anything for light programs (simple utility + GUI), and 30% of anything for specialized applications. Surely you can spare the effort to use a language you like even if it doesn't do everything (tm) just yet.
>>
>>55998264

Give me a better compiler, otherwise your dumb argument is pointless pedantry.
>>
>>55980182
You are the reason why programmers are becoming lazier and lazier and even the simplest app is bloating in size and power requirements.

In 10 years from now people have completely forgotten how to write efficient code and they will completely forgot how to optimize code too.
>>
>>55999037
Buy a better compiler.
>>
>>55996731

>But the worst part is the obsession with safety.

Hurry guys, I like to live dangerous!
Who cares that C/C++ basically invented the stack overflow and only works when you test the shit out of it?

Enjoy your segfaults, retard.
>>
>>55980290
>Lets store some number
>This bank looks alright
>Switch bank
>Store data
>Forget where you put them
>Read wrong memory by mistake
>Times is set to low
>Bomb is going explode in few seconds
>And all what you have to do was follow the train CJ
>>
>>55997217
>C++ is hideous.
Opinions are discardable.

> fear of requiring someone with a 20 year old codebase

This is standard comitee problem, not language problem.

> I'd rather take the responsibility for looking after manual allocations

Naked 'delete' are a reason to reject code review at my work. Besides. You have a problem with deciding private/public as well?

>The language itself is convoluted and extremely hard to parse.

So? Not my problem. I write the code in the language, not parse it. And even so,

Compile times are no longer then in other languages. Unless you are not a retard that writes 10000 line sources and links everything into a single binary. Compile speed is also compiler dependand. Gcc is slow as shit, Clang is quite fast.

Besides, if you think that c++ is hard to parse, try SystemVerilog.

> STL didn't have a hash map until some ridiculously late year.

Which is relevant because reasons and someone was a perl programmer. Hash maps and hash sets were available as extensions of the stl since forever and were available in separate libraries as well.
>>
>>55997284
>Irrelevant. Make one tiny mistake and you get a flood of errors.

From STL, not really. But yeah, it is kind of annoying. That is why pretty printers exist.

> Ah, yes, just don't exploit the power of the platform.

Win some/lose some. Boost with its heavy reliance on templates produces really 'awesome' error messages. That is what you get when you use a high level of metaprogramming. If you use a generalized solution, expect generalized error messages.
>>
>>55999865
Kek. Stack overflow is an issue that is as old as computers.

Besides C and C++ are two vaguely related languages.
>>
>>55980182
http://www.strawpoll.me/10945502
c pus pus is meme? meme wit me
>>
>>55994526
You're a retard. I work as an embedded developer and we use C++. We use ARM.
>>
>>56001114
Embedded developers don't use ARM in real life. PIC is still king. The 8031 is its second in command.
>>
File: hurr-durr-kid.jpg (11KB, 240x196px) Image search: [Google]
hurr-durr-kid.jpg
11KB, 240x196px
>>56002071
>Embedded developers don't use ARM in real life
>>
>>55993723
this. if you're gonna let the babbling masses influence your choice of using a well designed, god tier language, then you might as well join the babbling masses
>>
>>55993723
>>56002377
>got tiger language
prove it
Thread posts: 252
Thread images: 19


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.