Why don't you use more than 1 core when you write code?

Why don't you use more than 1 core when you write code?

Are you afraid?

Is your language so shitty that you can't into multicore programming?

Why don't you learn a good multicore programming language like Elixir or Erlang, anonchan?

Attached: functional-programming-18-638.jpg (638x479, 47K)

> No pony

My time is actually worth something to me. If I wanted a hobby I'd pick fishing

Uh, everyone uses multicore, fag.

Attached: 3031736.large.jpg (431x267, 54K)

>implying

Attached: gopher_monitor.png (398x460, 82K)

>object oriented trash
no pony

pic unrelated

>if the language is OO it must be like C++ and bad

>why don't you do this
>why don't you do that
so I can satisfy your shitpost? what a purpose to live

I don't like people telling me my code will magically able to use multiple core if I start using functional languages. There must be some big tradeoff you're not tell me about.

>There must be some big tradeoff you're not tell me about.
autism

Not OP, but yes there are tradeoffs. For example in pure functional languages things like hash-tables become difficult. Always use the right tool for the job, if you are implementing an in-memory database engine, a functional language is probably not the best option. If you are writing a compiler on the other hand a functional language can be very nice.

This is the hello world of Erlang

"Write a function which starts N processes in a ring, and sends a message M times around all the processes in the ring. After the messages have been sent the processes should terminate gracefully."

actually for an in-memory database, Erlang is the perfect answer since it comes with Mnesia built-in.

>Lisp, OCalm, Clojure
Dead

>Erlang
For boomers working in telecoms

>Elixir
Erlang with a facelift.

>Haskell
For nerds in universities, barely used in industry.

>Scala
Uses JVM. prepare to get sued by Oracle.
Also inferior to Kotlin.

>For example in pure functional languages things like hash-tables become difficult.
It's not difficult, just use Ideal Hash Trees.

I don't know how mnesia works but I highly doubt it's a purely functional hash table that gets rebuilt every update.

Using a library hardly counts as implementing a database, the point is that in databases hash-tables are a useful thing to have. And in pure functional languages you can't have them(you can but it's stupidly inefficient).

It can be done if your functional language is not pure, but then you also loose some of the guarantees that enable easy parallelism. (Message passing is not unique to functional languages)

>OCaml
It can't into multi-core because of GIL, and it's quite infamous because of it. If you have to shitpost, at least shitpost properly.

>Implementing a data structure is not difficult if you just implement this other one.

C# job system

What if OP actually chose OCaml with that in mind, so he could trigger informed autists like yourself?

>C++ is bad
Wrong.

Hash tables use arrays under the hood and arrays can't be made immutable and efficient at the same time. That's why pure FP languages either use linked lists or trees. Hash trees still allow you to have amortized O(1) lookup time, so you don't lose anything.

C++ is a mess of backwards compatibility and a misunderstanding of smalltalk object orientation. I don't really understand why I would ever want to use it for anything.

Ah I see. Any performance boost you could theoretically get by parallelization goes to naught because CPU gets murdered on cache misses.

F# is objectively the best functional programming language

You're not wrong, but at the same time not saying what to use instead.

Proof please.

Tell me your use case and I will give you the best language I can think of.