[-] noli@programming.dev 22 points 6 months ago

Compiler optimizations like function inlining are your friend.

Especially in functional languages, there are a lot of tricks a compiler can use to output more efficient code due to not needing to worry about possible side effects.

Also, in a lot of cases the performance difference does not matter.

[-] noli@programming.dev 19 points 7 months ago

Did it as a student job for 3 years. I was paid roughly 50% more than with all other student jobs.

Honestly collecting garbage is not even that bad. I got paid to do fitness all day, spending time outside while chatting with my coworker. The people sorting the trash, that was who we felt bad for. They had all the downsides of the job with none of the benefits.

[-] noli@programming.dev 45 points 7 months ago

Dogmatic statements like this lead to bad, messy code. I'm a firm believer that you should use whatever style fits the problem most.

Although I agree most code would be better if people followed this dogma, sometimes mutability is just more clean/idiomatic/efficient/...

[-] noli@programming.dev 32 points 7 months ago

In functional programming, everything is seen as a mathematical function, which means for a given input there is a given output and there can be no side effects. Changing a variable's value is considered a side effect and is thus not possible in pure functional programming. To work around this, you typically see a lot of recursive and higher order functions.

Declaring all values as const values is something you would do if you're a diehard functional programmer, as you won't mutate any values anyway.

[-] noli@programming.dev 26 points 7 months ago* (last edited 7 months ago)

Tar Xtract Ze Vucking File

Edit: apparently someone else already mentioned this, oops

[-] noli@programming.dev 27 points 8 months ago

You clearly don't use this one, don't you know lemmy instances automatically censor your ********?

89
submitted 8 months ago by noli@programming.dev to c/196@lemmy.blahaj.zone
[-] noli@programming.dev 22 points 10 months ago

I see, so I'm assuming the same goes for regular actors? And musicians? And basically any performer ofcourse? Oh and also anyone who does manual labour because you are literally renting out your body for that. Well, and technically anyone with an office job too because they are still renting out their time.

[-] noli@programming.dev 78 points 10 months ago

Grandpa knew what he was doing when he called all the pokemen pikachu

[-] noli@programming.dev 22 points 1 year ago

The typical arguments for a dynamic typed language are that it takes less time to write something in it.

The benefits of static typed languages are that your development environment can be a lot smarter (ironically enough leading to faster development speed) and several classes of bugs being unable to happen. In a statically typed language, the IDE can detect if you're trying to call a function that takes a number but you're actually providing a string. In this case the IDE will let you know and you can immediately fix silly mistakes like that.

[-] noli@programming.dev 23 points 1 year ago

Which is why I'm of the opinion that dynamically typed languages are evil. !!"false" should either be caught at compile time or raise an exception.

I'm thoroughly convinced that the only use of dynamically typed languages is to introduce bugs

[-] noli@programming.dev 29 points 1 year ago
view more: next ›

noli

joined 1 year ago