C++

C++ is the future. Moore's law is ending and performance will be paramount in the future. Your Java and PHP will be too slow. /tech is now a C++ board.

Other urls found in this thread:

my.mixtape.moe/uosmls.webm
nuitka.net/
stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list
isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines
8ch.net/metatech/rules.html
blog.jwhitham.org/2016/02/risc-instruction-sets-i-have-known-and.html
github.com/mystor/micro-coreutils
google.github.io/styleguide/cppguide.html
rust-lang.org/conduct.html
debian.org/code_of_conduct
freebsd.org/internal/code-of-conduct.html
ubuntu.com/about/about-ubuntu/conduct
boost.org/community/policy.html
python.org/psf/codeofconduct/
ruby-lang.org/en/conduct/
savannah.gnu.org/maintenance/CodeOfConduct/
git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/CodeOfConflict
web.archive.org/web/20020802042707/http://www.debian.org/MailingLists/
twitter.com/SFWRedditGifs

daily reminder that Barney Soupstrap never shipped a commercial product in his life and is not qualified to direct a language that sees real world use

...

Then why does the real world use it?

I think would want a word with you.
You are literally the cancer killing technology, you should always write efficient and high quality code for anything that you'll be sharing. The needless bloat that exists nowadays is disgusting, I could be using the resources you've wasted for other things.

...

I don't agree that it is the future, but I agree that it should be. I think if anything will be the future it will be a Go++, that is an object oriented Go. Most of the big languages nowadays, Java, PHP and Javascript are horrid and need to die, Python is alright but needs a severe speed improvement, Cython and PyPy are basically its only hope for that.

...

...
How are you doing that?

C++ has all the momentum. Decades of code written in it. Golang is exists because Google needs interchangeable developers in a reasonably fast language.

Apparently, they're mine. I tried to post a webm a couple of times but they didn't go through. Empty posts did for some reason.

This is the file I was trying to post:
my.mixtape.moe/uosmls.webm

Because it doesn't have competition, that's why.
C++ is the only widespread object-oriented programing language that can do high-performance stuff.

C# and Java are arguably saner but their performance is shit.
C is even faster than C++ but is not object-oriented.
Go and Rust are mostly comparable performance-wise but are too new and not yet mature.

Even though C++ is a terrible monstrosity that only a horrifically warped mind could have invented, it is for the best that it stays around for some more time -- at least until the competition fully matures, that is.

C++ is pretty good tbh

Compiling to .cpp and using the occasional feature maybe.

Man I'm tired.

1088 tabs of futanari shotacon bukkake instead of 244? human brains don't think in massively parallel so what's the point of wasting effort specifically to waste resources?

Definitely. Especially when you consider the competition:

Elaborate.

To be fair, it's not unique to Go, really. It's just one of many languages (like Java) that inhibits abstraction, adds verbosity and reduces the number of ways the programmer can write something. The result is that Go code is more dull and uniform, allowing your employer to easily pass on your Go code to any Pajeet that ends up replacing you.

There is a theory out there that there are forum trolls dedicated to bashing Golang to keep people from learning it and keeping wages high. GIDF.

Oy vey, that's terrible!! The chutzpah of those goyim!

Can you upload somewhere else? Mixtape doesn't play well with webms, when I downloaded it it was corrupt.

You mean Erlang / Elixir

...

In only one case did I determine that the borrow checker was wrong, and that was after several iterations where the borrow checker was right and forced me to rethink my implementation. This was an edge case solved via UnsafeCell. The vast majority of the time having to deal with lifetimes in rust not only saves you from stupid bugs down the road, but makes the code easier to read and reason about for other programmers. I fought with pointers when I first learned C, and those weren't nearly as forgiving as rust

if you want to have "fun" (getting shit done quick & dirty with no responsibility afterwards), use a scripting language

Then this is a good thing. The company is acting fairly and reasonably in wanting to minimize the cost of coding, by reducing it to something easier that more people are able to do, and hence commands a lower wage.


>>>Holla Forums
The free market is not Jewish. But leftist economics is.

Cons on ObjectiveC please? I'm considering going full throttle with it.

Apple only, will become legacy now that Swift is a thing, Apple only. C++ is on all platforms.

What the fuck does that even mean? "oh man hahaha, I'm casting a pointer to a struct from a void pointer, and they wanted to watch a movie".

It's not everyone's type of fun.
I think he means boring in the sense than it's too hard to break things.

The future is immutability and functional programming. Messing around with the state was bad enough on single CPU systems. Now that cpu's arent getting faster but are becoming more parallel, the benefits of immutability are becoming stronger while the custerfuck of OO is getting worse.

People have been saying this for 30 years and it still isn't any closer. Right now, in the current year, if you want to write a complex program where speed matter, you still choose C++. Look at, for example, programming neural networks with GPUs. Still done with C++.

Wow, it'd be the first successful website written in C++ :^)

Where's the source code?

The speed killer in most programs is not the programming language but bad code with bad algorithms. it doesnt take much data for a nlogn algorithm in python to beat a n^2 algorithm written in C. Your example is an edge case and not representative of software as a whole. Certain applications are always going to milk as much performance as it can get no matter how fast computers get. Functional programming, especially in scala is getting a lot more popular. I dont think functional programming is ever going to get to the level OO has, merely for the fact it requires thinking.

Why don't we all just use assembly language.

When Moore's law ends C++ will be a high level language and ASM will be low level. The hipster brogrammers will be purged from the Earth.

Hipsters are too lazy/stupid to learn assembly.

My point exactly.

Daily reminder that this is how fucking stupid Holla Forums is. It's probably not even bait.
Along with other stupid shit from retards like

Actually I can't even tell the difference between Holla Forums and /g/ anymore compared to late 2014/early 2015, seems the honeymoon is over.

Explain what's bad about assembly language, you fucking pleb. Do you like being inefficient?

And you probably learned more that way about how the actual underlying machine works than if you had been restricted by wacky memory management rules from the beginning.

Also, I'd imagine dealing with "unsafe" things helps develop self-discipline.


What's wrong with a little rewarding challenge?

How does it feel to think you're a comedian when in reality you're just shitting where you eat?
Fuck off, retard.

Not an argument.

Neither is pretending that you are retarded on an anonymous imageboard.
Fuck off, retard.

Not an argument.

>>>/g/

Still waiting for that explanation for why assembly language is bad.

First of all, I didn't say assembler was bad you role playing piece of garbage.
Can you please stop shitting up Holla Forums and go back to /g/?

I guess I should just stop coming here since the honeymoon is over and you faggots are more plentiful, it's not like there's actual technology discussions anymore, hasn't been for months, even Holla Forums on this site has better tech discussions.

You use this board as a place where you can just shitpost because you think you're hilarious.

Bye faggot.

Are you ok user? Why are you shitposting so hard?

Assembly is pretty dank, but it's machine-specific and doesn't have many helpful zero-overhead abstractions (beyond labels and simple macros).

You are replying to him as if he was serious, and as if that same question hasn't been repeated by every fucking retard who thinks he's a comedian for years.

What are you on about? You sound incredibly butthurt about something.

If you really want to, you can kinda do it in a ghetto way in C using structs and pointers. It's not pretty, but it's been done, such as in earlier idTech engines IIRC.

Well yeah, you can also do some very ghetto and limited generic programming with macros, but at that point you're probably better off using C++.

I don't think there's any way to imitate lambdas, though.

What's the cut off point?

Object orientation is worthless. C++ gets used for scoped destruction and exceptions.

o i am laffin

I like lambdas, but they're by no means a make-it-or-break-it feature of a language

wew lad, don't be such a pleb

The key factor in performance today is jitter. Jitter excludes almost every potential competitor to C/C++. We need better benchmarks as these don't tell that story at all.

Example: Imagine networking code for a 10Gbit network. At a 9000 byte MTU, it's about 139k packets/second,or 1 packet every 7.2us. If a packet is suddenly late by more than 7.2us (assuming low variance) it will cause loss in TCP. If several are late in a row it will cause spectacular performance problems (window crash, instability). Let's say I'm using Java and GC kicks in and pauses everything for (being extremely generous) 10ms to wipe the programmer's ass. That represents losing about 1.4k packets and 12.5M of data. That's huge. It would take a long time for TCP to fully recover, by which time Java would probably be ready to do another sweep.

This is why no one writes an OS in such languages, it just doesn't work regardless of how fast CPUs get. The problem is, almost every new language is designed like this. And so, we remain stuck with C/C++ despite both being pretty bad.

>>>/plebbit/

You haven't looked at many C library's sources, have you?struct post;struct post* post_new(struct post *p, ...);void post_apply_wordfilter(struct post *p, wordfilter *f);void post_delete(struct post *p);C++ only adds syntactic sugar and RAII for stuff on the stack (the only actual innovation - quite useful too). You can do object oriented programming in C just fine and if you don't want to bother with memory management you can use the BDW garbage collector (even has finalizers).

...

...

shit

So you're salty that nobody shares your delusion and that Holla Forums is still a PHP board. Ok kid

wow how salty are you right now?

Lol, this is great

If anything is the future, it's cross-compiled languages. E.g.: nuitka.net/ , which works great on GNU/Linux and reprehensibly bad on Windows, where it's Visual Studio's way or the highway.

If you put a bullet to my head and made me choose, I'd tell you to pull the trigger, but barring that, I'd rather program in C than Sepples itself. Stroustrup is one fucked-up motherfucker to have come up with something so twisted as Sepples. But if you gave me the option to write in a less fucked-up language which cross-compiled to something like Sepples which THEN gets compiled proper, I'd prefer that instead.

Also
>When Intel has zero competition and no reason to continue doing any R&D

Remember when monopolistic companies weren't massive pieces of shit that benefited nobody but themselves? I do. RIP Bell Labs.

It is gun to the head.
Moores law didn't kick in, it stopped being true.

Anons, can you compile a list of good C++ for /tech? I will start,

Effective C++ by Scott Meyers.

That's a pretty dumb claim. Following your logic, every language out there is just "syntactic sugar" for assembly, since there is nothing you can't accomplish without assembly and large doses of autism.

Languages are all about "syntactic sugar". Even properties usually attributed to functional programming, such as immutability, can be achieved in assembly if you simply choose not to modify those values. Fuck, you can even nig-rig closures in C with structs and function pointers, and C was never meant to support closures. Does being able to make an ungodly mess with these barebones features automatically reduce Scala to sugar-coated C, which is actually just sugar-coated assembly?


FP is not popular because FP is nice as a tool, but not as your main dish, because it makes sense logic-wise but not hardware-wise. It's not because "it's so hard only I have managed to understand it", it's because fully functional real world programs would be even slower than the scripting languages you feel are slower simply because they aren't compiled, like your language.

Machines are designed around the concept of mutable state, so it would be dumb not to use it.

Whoops, I thought Moore's Law ending was Moore's Law. My bad.

The spirit of what I said is still true. I'm sure I'm not the only one who would rather use a cross-compiled language than go insane staring into the abyss that is C++. Even "modern" C++ is a clusterfuck. Actually, especially "modern" C++.

Modern C++ is pretty clear. In fact, people say C++17 will be so clean it will look like a scripting language. I sincerely doubt it, but hey, who knows.

Anyway, the main problem with C++ is that all the legacy crust gets mixed with the new stuff, and basically, it looks like the language is thrice as big than it actually is, even though some of the stuff in still in use has been deprecated. Read the cpluplus.com tutorial on variable initialization if you want a perfect example of this shit.

tl;dr someone should write a book exclusively on modern C++ so people can forget about the legacy stuff and start writing clean C++ code.

This so much.
C++ is a mixmatch of every standard since C was created.

What is your C++ programming discipline fagets? Master race incoming.

OPINION DISCARDED

...

What else would you call translation of foo->bar to ::bar(foo,...)? What I omitted in last post is that c++ also ads multiple inheritance and better type checking for normal inheritance... so yeah, c++ does add some nice stuff, but it's not at all essential for OO programming and the difference for most normal plain classes is minimal.

Depending on the implementation, std::function can be somewhat bloated and inhibit optimizations because of type erasure and indirect calls, so it's probably better to use a template type if you're just passing the function object as argument to other functions. However, it's true that if you're storing the function object in a class, std::function can often be the best solution.

The definitive C++ book list.

stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list

Why would anyone champion the absolute, unarguably worst part of C++?

Holla Forums's coding challenge thread showed that even using the same algorithm the non-C entries were a minumum of 10 times slower.

Excuse me, I'll sit on my growing pile multiple threads.

Though I agree with the premise. Having more speed is no excuse to program like a retard.

...

IDTech source code

Discovering Modern C++ by Peter Gottschling

Accelerated C++ is really good for beginners.

Flawed argument because there is no future in the desktop.

Swift masterrace.

...

Because it's too hard!!! :^((((

Compiling dynamic languages is a dead end. The compiler is always working around terrible features that made some example program easier. The academic strain of SML/OCaML/Haskell are probably the way to go once someone doubles down on no GC for the low jitter . This has been done, but not in a usable way -- probably very few people on the planet are currently capable of writing code in Bedrock with no training. The key here is that the compiler gives you features, but only features that aren't slow shit.

On the other hand, in groovy you can hook arbitrary function calls. Now you have to trampoline everything in case some fucker uses your reflection capabilities.

...

It's already been done user. This user knows:

Why don't you do it user? Everything you need to pull it off is already spelled out for you here:
isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines

Need I say more user?

lmao i love bad guy steve xddd
i almost lolzored my pants Xdddd

Let me guess...dropped on you are head as a baby friend?

Rust is the future. Faster than C or C++ because of its better typing expressivity, significantly more higher-level features, much more regular for parsing, etc., uncomparably better extensibility features in the form of both dylan-style macros and camlp4-style compiler extensions, very easy FFI to leverage existing C libraries, native inline ASM support, typeclasses, and, perhaps most importantly, NO RUNTIME!

It only needs 2 things: a large mozilla-free community so that we can be free of the CoC, and optimizations to actually surpass C++ performance instead of roughly matching it.

idtech is literally C with classes. It's the definition of poor C++ code. This is also somewhat on purpose because it was an extended port of the previous C-only idtech engine. A good game engine with good, modern C++ code which source is freely available is unreal engine 4.

No: it was you who sustained brain injuries as an infant.

Rust is SJW garbage. There is too much C++ code out there. No one is going to start over with Rust especially with tooling. Only faggots in San Francisco and other places where taking it up the butt is acceptable will use Rust.

This. I have zero intention of learning Rust because of it. Besides Sepples has YUGE installed codebases out there.

This is why I have embraced C++ wholeheartedly no matter what flaws it has.

Rust is unusable and always will be as it depends on compiling everything as a huge blob of shit for its borrow checker to not have horrible performance and that makes development not scale.

The CoC is only applicable to mozilla-controlled communities. If you don't like it or any references to the CoC, you can literally just fork the compiler and remove the CONTRIBUTING.md which is the only file that even mentions a CoC (it links to it).

I ignored rust for the longest time because of the CoC, but after having tried virtually every still alive non-esoteric languages, I have to say that rust is bar none the best.
My previous favorites were C++ for performance and serious programs, ocaml for large-scale programs with few inherent dependencies, and scheme for scripting (chicken > racket, d/w.it).
Now I'd use rust for everything except scripting.

People have already started with rust. For a language as young as it is, it's already surprisingly active (more so than some languages that are 20+ years old).
C++ code that's worth using almost always has C bindings, which can be used trivially with rust, the exception being game-related libraries. Rust can technically use C++ code anyway (because it targets llvm ir) although this feature isn't very developed yet.

What does "especially with tooling" even mean? Cargo already exists and it's significantly superior to the garbage situation in C/++ land (with make/qmake/cmake/gmake/autotools/etc.). Emacs and vim both already have plugins, and there's a great IDE for rust already available.


At least try to learn about the language, let alone use it, before spouting nonsense.

Tools like Visual Studio which is the best IDE out there.

Ignoring the Yuge investments made in the major compilers for C++ (and not for Rust) is one particularly important one I imagine.

Maybe Rust can try and hijack the C++ code-generation phase in an attempt to catch up?

Rust targets llvm, so it has access to most of the same optimizations clang can perform for C/C++ already. It's already competitive in terms of performance due to this. Additionally, real-life rust libraries can already be faster than real-life C++ libraries, such as leaf v.s. caffe, despite the early state of these rust libraries.

Nevertheless that's an acceptable point in that rust in young, but since the OP is about "the future", I disagree that this would be relevant.


Wow, pleb!

Available IDE plugins:

Eclipse
IntelliJ IDEA
Visual Studio

Editor plugins:

Atom
Emacs
Sublime Text
Vim
Visual Studio Code

Rust has a package, racer, which gives completion/definitions/etc. to any plugin, so it's well-integrated into everything (much better than, say, g++).
There's also zeus and solidoak. Solidoak is basically a frontend with integrated rust support which embeds neovim.

Moreover, rust errors are significantly better than C++ errors, so it's already easier to debug rust code.

Rust also has support for lldb (because it targets llvm) and has some support for gdb because of that. For static analysis (though I doubt anyone here has a need for it), the compiler plugins system of rust gives it significantly better flexibility and power in that department. There are already tons of ad-hoc static analysis extensions, but probably not as much as in C++, admittedly.

Rust is only popular in queer places like Hacker News where things like the basic income, communism, are argued for seriously.

When Moore's Law is dead low level programming will be ASM and high level programming will be C++. Rust will be just another SJW tech failure, like everything communism touches.

But it is dead user. Tombstone marker has d. 2005 on it don't you know?

But yea, dies are expanding out and even up now, so electrical efficiency will be even more important in the future than in the past!

Rust being bad doesn't make the idea bad.

You're only popular in your mum's basement.

you obviously don't belong here if you don't want to be paid to watch anime all day
>>>/reddit/

I had a laff m8
Communism is the ideology to totally eliminate private wealth.
Basic income is actually pushed by lolbertarians as an alternative to the welfare state.
Maybe you should go back to Holla Forums where you ramble on about shit you do not understand.

Commie faggots. Basic income is a trick the Jews are pulling by dressing up equal incomes for all with "free market" rhetoric. Why do you think they are pushing Agenda 2030 and micro apartments so hard? Your entire life will be managed like this. You have no job, so the state will give you money to live(basic income), which will buy you a subsistence living in a micro-apartment. Of course there will be community service projects tied to that money at some point in the future. The only answer is cutting the government down to size and removing most taxes. People know how to spend their own money better than a bureaucrat.

he is obviously only pretending to be retarded, my question is, are you?

come on buddy please?

dumb fucking commies think they aren't a part of nature

it's way better than every other language that isn't C, C++, Fortran, Ada or Rust.
In fact, Java and C# are in the second best cluster.

Object-orientation isn't a good thing most of the time, and when you need it you can emulate it or use a library like GObject.

no, they are not. Rust is almost as fast as C++, Go isn't. Go wasn't designed to be a low-level systems programming language, Rust was.

Kill yourself. I tested this myself by attempting to work on librustc. It's only 100k LoC of rust but it can take hours.

the board is worksafe but you have to be 18 to post, junior

I wish: 8ch.net/metatech/rules.html

Because x86 is an unholy mess.

compiler does a better job at assembly than you

case in point: anons trying to write echo/true in asm

the future is purely functional languages such as Haskell, as it easy to write parallel code and to reason about the code and create formal proofs to grantee properties leading to more secure programs. the big problem is that the architecture of all modern processors (particularly x86) is not the most friendly to functional style of programming

More like, functional programming isn't friendly to efficient (highly stateful) realistic architectures.

enough with your shilling, fagit

Bullshit.

Imagine a purely functional kernel.


You need state or side-effects at some point. The overhead caused by not wanting to reuse memory is way too big to be "the future". At best, functional programming will become more popular in the future, but only in stateful "functional" languages (Lisp, Scala, Rust, etc) or multiparadigm languages.

Fuck, the Rust devs admitted that useful systems programming REQUIRES state. I'm not making shit up.

Even haskell agrees with that, though. The disagreement is in where the effect should be represented. With rust et al. it's "immediately", with haskell it's "in the evaluation of the IO monad".

Personally, I believe it's simply too much trouble to not be able to do quick debug operations without having to care about unwrapping errors cleanly so they propagate back to IO, and I think multiparadigm is the way to go because different problems are better expressed in different ways. However, it's a fact that haskell works well enough and you really don't seem to understand how purely-functional programming works. For example, you say
But it's really literally the opposite, the point is that the compiler will reuse resources as much as possible. There is an operation that looks like a copy to the user, but its implementation is complete data sharing beside the changed sector.

this

i realize ASM is a meme around here, but unless you've dedicated your career to an architecture or two, your hand coded assembly will never match that compiled by gcc or clang

I know it works more or less like git in the sense that versions aren't copied completely from commit to commit, but actually the differing parts. It adds some overhead, but more often than not, not enough to be noticeable in a single program.

Now, keep that system running for months, modifying files every day, and things won't look so happy with all that fragmentation unless you want to "combine" data periodically and fuck your purity's shit up.

kripplekike pls

It's actually so efficient that it's outright faster when reads/transfers are more common than writes (I'm talking about the functional memory model, can't really speak of a functional OS here).
A defrag wouldn't change anything (if the os is well-designed of course) because read/write ops would work at a higher-level than the disk, just like you can in fact print things to the screen with a haskell program despite the promise of lack of side-effects.

You have described a COW filesystem

Okay pajeet

Nah, functional programming has never been less popular than it is now. It's headed towards everyone just giving up on it outside of some domain specific cases. Took way too long for people to admit it was a dead end.

FTFY. Every language gaining more and more functional features, new languages (except go) built with functional features from the get go, functional programming styles more and more popular in all forms of programming tasks, especially things like FRP.
Maybe in pajeet land things are different, though, I wouldn't know.

x86 is quite nice, actually. It's a lot easier to use than ARM and generates smaller binaries although that niceness comes at a cost to power consumption.

Here, have an article to read

blog.jwhitham.org/2016/02/risc-instruction-sets-i-have-known-and.html

You just defeated your own argument.
With echo, both the 64-bit version and 32-bit version, we wrote something faster and considerably smaller, same with true and there's still room for improvement, in fact I've found a way to make both of them considerably smaller and to possibly make echo even faster (by using some special purpose registers as general purpose registers to hold some constants since those special purpose registers never get used, as well as not bothering to pop arguments off the stack)

Have you looked at existing versions, like this one?
github.com/mystor/micro-coreutils

Yes, but they're much slower and no where near POSIX compliant. The echo in there is roughly how my earlier versions of asm echo worked, before the speed issues were pointed out to me. The true and false in there is also much slower because of its use of the stack, my version never even touches memory.

I don't need to read shit, they're optimized for different things. ARM will always be slow, x86 will always have higher power draw.

Because streams are great at writing clean code and the streaming operators more or less self-document exactly the intent of the author.

This.

Is this a ruse? Has my leg been tugged? Jesus there are so many things I could say... Show the class what formatting a number without side-effects looks like, user. Or how about internationalization where in some languages the order of variable arguments need to be changed by the translators, how does that look with iostreams? Have you measured their performance or looked at the code generated? You're picking the one feature in C++ to champion as "clean" that is the textbook example of unclean.

What was the original justification for io streams any? What did they think was wrong with printf?

printf and other variadic C functions aren't type-aware which is pretty shit for the way C++ wants to work. But they didn't have proper variadic support at the time in C++ so they tried to side-step it with operator overloading and created a mess. Then they made unrelated comically huge bad ideas in the design of ios_base for no reason other than being fully retarded which is why performance is so awful and can't improve without breaking the standard. A lot of people think iostreams code should boil down to less code than printf and get surprised by the bloat due to those stupid virtual functions in base.

The iostreams of C++ are highly criticable, but to reject them is fighting against windmills.
IMO It's best to learn their quirks and use them regardless. Stdio may do in some cases but it cannot portably do polymorphism in the sense of GNU's fopencookie.

Sure iostreams is difficult to subclass correctly, but boost iostreams makes this task significantly simpler.
Also boost format can provide printf style formatting, to answer 's criticism about i18n.

I got a book about STL from 1996 for free would it still be good

No book is needed for STL. You should read header files instead.

Well the whole thing is basically a large listing of its functions with example programs and stuff

Stop with this cancerous meme

whats wrong with exceptions?

Thanks for the link, seems to be a good read.

I've always been sceptical of C++, I've stuck with C mainly, but am learning rust at the moment, the clear and detailed compilation errors and warnings are refreshing

Unwinding them is slow, so using them java-style is retarded. That's it.

It's hard to use correctly (in C++). In C you'd check the return value and handle things accordingly. C++ exceptions sort of try to get rid of this/separate it from other code. The problem is, that handling of errors is often too complex to be swept under the rug without having negative consequences. Having to check return values of everything is pain in the ass, but it's the best way make sure that you handle everything correctly.

I haven't read anything this retarded in months. Thanks, ctard.

ok i think i see, we use exceptions pretty extensively at my work (trading stuff) so i was wondering what the deal is. not sure i agree really

Curry++
Pajeets delight

in my experience pajeets only java

google.github.io/styleguide/cppguide.html
Read the exceptions part, they have some sane reasons to not use them

jfc have you even seen the syntax of objective C? I don't know how anyone who is a real, professional developer can look at that trash for longer than 5 minutes and not suffer a brain aneurism.

My company lost one of the two iOS developers and I had to do code reviews for iOS shit. I was extremely close to quitting on the spot.

Syntax is the least of Objective-C's problems, personally it doesn't bother me a bit. The true retardedness is to discard static types during the compilation, and ending up with dynamic dispatch compiled as a map lookup. It's slow as shit, despite being amortized using caches. This pitiful implementation is probably a consequence of Objective-C initially existing as a preprocessor for C, but it was inexcusable for this crap to remain unfixed in Objc 2.0.

Is Rust SJW?

There is absolutely nothing wrong with exceptions, at least when used correctly (ie. not à la Java). It's only bad when it's used as a mechanism for ordinary control flow.
Good programs should throw but nearly never catch, except maybe at the starting point.
I'll add that Stroustrup and others advocate exceptions to signal errors in constructors, which IMO is a much better alternative to zombie objects.

I've never programmed before; should I learn Python before going on the C and then to C++?

Starting off with a high level language is about the worst disservice you can do for yourself if you want to learn to program. You should learn what is going on at the machine level before you add tons of abstraction above it.

Start with C. Then move up to C++ or Python. Then move down to ASM.

I would say it depends what you would like to accomplish.
Python is a language to hack together simple tools, C/C++ are languages to build software.
Python programming is fragile and you should not use it to build proper software. It has decent learning value, but you should move on to something better after it.
Definitely learn C before C++ however. I personally learnt C as my first real language after BASIC.

Python is useful much earlier, and it's easier. But C teaches you more about the way things work "under the hood", and it gives you a better idea of how efficient things are, even in languages with more abstraction like Python. There are a lot of arguments for starting out with either one. I don't know which is best.

But C++ is so complex that it probably isn't good for starting out with.

All C is valid C++ so this makes no sense. You only need to use as many features of C++ as you need and understanding OOP after you grasp basic branching data structures, pointers, and recursion is a vital step which C can't teach you.

Rust isn't SJW but it's CoC and its main development team sure are.

No.

Does it have a big CoC? ;))))))))))

find out for yourself

rust-lang.org/conduct.html

Apart from a few phrases that trigger Holla Forums like "gender identity" it reads pretty much the same as most open source projects

No it does not, on account of no open source project having a coc in the first place because it's fucking retarded and the perfect way to kill a meritocratic development model.

How are codes of conduct inherently anti-meritocratic in general?

Oh God, for file I/O? Why? You'll end up using the C versions for network I/O anyway.

you might want to check your sources there buddy

There's very little difference. Control your autism.

Because if you're the best programmer in the world but use the wrong words they'll prevent you from contributing.

I'm talking about code of conducts in general. They don't have to say those things.

Any restriction on conduct is a restriction on code that is unrelated to its merit. Hence, they are inherently anti-meritocratic.

I have, and none of them have any kind of code of conduct whatsoever.

Hey man black transexuals are an untapped resource and you're all fucking it up by not overtly supporting them in every way

debian.org/code_of_conduct
freebsd.org/internal/code-of-conduct.html
ubuntu.com/about/about-ubuntu/conduct
boost.org/community/policy.html
python.org/psf/codeofconduct/
ruby-lang.org/en/conduct/
savannah.gnu.org/maintenance/CodeOfConduct/

That's a horrible reason to use mutable state. Mutability causes all kinds of problems and people come up with clusterfuck solutions to dealing with it. You should avoid mutability if you can, but that's not always possible. I agree that whether you should use functional programming depends on the context of your work. It's not like people dont write buggy slow non-functional code all the time though, even in C.


Way to completely miss the point. Of course identical programs are going to be faster in C. People dont write identical programs, and that's why writing good programs is more important than the language itself.

I'm the other functional guy in this thread and that's so wrong. Unfortunately functional programming is never going to be nearly as big as OO is, especially not with haskell. Your best bets for functional programming to get popular is Scala, which isnt really functional as much as it has everything, and Clojure. Clojure is a lisp so good luck with that getting popular. That leaves Scala as your best bet for functional programming in the mainstream. Start preaching Scala. If you look Scala has been getting a lot more popular because you can do anything and it doesnt throw you in the functional deep end.

People have been criticizing me for saying functional programming requires a higher level of intelligence, which it does, but not that much more. I'm not trying to be elitist here, it's not that hard. The problem is it will never be adopted by the lowest common denominator programmers and managers who like to pretend they know what is going on by looking at UML diagrams. Bad managers love OO.

Congrats, you managed to not link a single relevant thing.

More like you should avoid non-mutability. I take it you came from extremely high level languages where no one cares about performance or memory consumption and your coworkers are H1B curryniggers no one can trust to do anything right. For people who need to write good code, copying is waste. Allocating nodes for data structures is waste. Temporaries are waste.

Not my fault you're a retard

Actually, with mobile being the driving force in computing, and more and more applications being pushed into the server space, Java is probably much more relevant than C++. Especially when you consider Android is the dominant mobile platform.

Anything written on mobile that is performance sensitive will be written in C++ like any mobile game with 3d graphics.

Actually I've programmed in C more than any other language. I like it too. If you have the ability to use higher level abstractions you should do it. The scope of problems you should use C for is shrinking because of the ease of making mistakes and high consequence for those mistakes and safer alternatives are available. Even the best programmers make mistakes. You really need to get rid of the C's performance and low overhead being the end all attitude.


1. Do you exist in a world where only practically no-resource systems exist?
2. You definition of "good code" differs from people who need maintainable and not buggy programs.

I know the C/Asm meme is big on Holla Forums but cmon.

Best post of the thread.

The kernel's written this way. Is it bad code? Should we replace it with Haskell? Would that improve it?

But there should be restrictions that are unrelated to merit. If someone is an asshole who is unwilling to cooperate, constantly disrupts the discussion or even makes real personal threats, he's doing more harm than good, even if he writes great code. If you try to have such a ridiculously "pure" meritocracy it's bad for the code, not good.

That's why even Linux has a Code of Conduct:
git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/CodeOfConflict

By kernel I assume you mean linux kernel. No the linux kernel is not written that way. Linux kernel code both uses temporary variables and allocates nodes for data structures. Yes there is "bad" code in the linux kernel too. I never said you should never use C. I actually said the opposite.

Saying that is how I know you are full of shit.

We didn't have them all through the '90s when Free Software was at its peak and we had massive flamewars (on mailinglists that didn't even support the concept of bans), and those "disruptive" people making "real threats" were some of the most productive. It was the PR-fearing corporates moving in and hiring everyone that led to penetration by CoC. The LinuxFoundation having a salary leash on the top devs is why Linux has a CoC, not because it needed one for development, but because they had to superglue a suit and a tie on the thing to protect their own image.

The Debian mailing lists have had a code of conduct since 2002:
web.archive.org/web/20020802042707/http://www.debian.org/MailingLists/

So you think it's always better to pay more for the same thing?

more like concurrency will be paramount in the future because horizontal will be the only way to scale. that means functional programming is going to take over

Is there a master list of all functional programming languages?

jesus who let the compsci majors in here

literally 90% of functional languages are someone's master thesis or phd work.

C++ is definitely growing in popularity for mainstream and HPC performance or efficiency-critical software development. C continues it's long slide into niche obscurity.

wikipedia? `\(°¬°)/`


whut?

Why would I use c++ instead of C?

Muh OOP

Why should I use C instead of C++?

Should I learn C++ as my second language?
Should I know C(or any other langauge for that matter) before trying C++?

Because you may not need all the superfluous stuff and that the libstdc++ could be too big for specific machines (think embedded shit, I don't know if there's a musl/uclibc equivalent for c++).

C++ because operator overloading is something we totally use constantly in production after spending half a semester fucking having it drilled into our fat skulls. It's totally not bloat at all or anything. BRB adding totally intuitive overloaded '->*' operators to my fizz buzz because that will show the interviewer that I'm hot shit.

Pleb

Just don't use managed memory the 5% of the time when you care about that shit.

operator overloading is a nice feature that is lacking from Java. Okay, it's not always used, but sometimes you want to do mathematical operations with custom data types such as vectors or matrices, or use the [] operator on custom data structures.


You should learn C first.