Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "dereference"
-
It's not that I hate PHP, I just hate the lack of consistency in standard function naming and parameter order, nonsensical attribute access, nearly-meaningless comparison operators, reference handling, case (in)sensitivities, and more!
I mean, look at these functions:
strtoupper(...)
bin2hex(...)
strtolower(...)
And look at THESE FUNCTIONS:
array_search($needle, $haystack)
strpos($haystack, $needle)
array_filter($array, $callable)
array_map($callback, $array)
array_walk($array, $callable)
And let me jUST USE SOME ATTRIBUTES:
$object->attr = "No dollar sign...";
Class::$attr = "GOD WHY";
HOW ABOUT SOME COMPARISONS:
(NULL == 0) // true
(NULL < -1) // ALSO true
Functions AREN'T CASE SENSITIVE (at least variables are).
Wanna dereference? TOO BAD, YOU'LL HAVE TO GET OUT THE TNT.
Alright, yeah, I hate PHP.19 -
Before I decided to learn C, I had heard tell of pointers being "hard to use". Of course I thought "maybe so, " after all, that was basically the only thing I heard about pointers, "they are hard!".
And so, when I learned C, and I got to the part about pointers, I was expecting at least some trouble (I can't know everything) and it was just... easy? Maybe the trickiest thing was how * has two different meanings based on the context (declare/dereference) but that was easy too.
Why the hell is all I hear from people about pointers is that they're difficult?15 -
C is love, C is life.
Great language.
I genuinely don't get why so many people are struggling with pointers, considering it's a pretty straightforward concept. I understand that they can be complex in simplicity, but the concept itself is much easier to understand than say, references in OOP languages(despite being the same thing under the hood).
I mean it's just a number like any other number, except that number is treated as a memory address, and the star(* - dereference operator) just takes a value, goes to the memory address that is the value, and takes a value from there.
I feel like most explanations and tutorials just try to over complicate it for no reason.27 -
One of the guys were tasked to implement a button with a functionality.
When I clicked the button, I got an error. Asked the guy why, and he said that fixing the functionality was not part of the task. What? So basically he just put a nice little button that does nothing? And our team lead just approved his merge request?!
I can't comprehend this logic at all.
Another story, I overheard a different guy debugging a pointer array (C++) with a senior. I couldn't keep my face straight when he seems to struggle to dereference a pointer and iterating through an array. He can't do that and he calls himself a mid-level engineer?!
The more I stay in this company, the more I realize that many people in my teams are clowns.4 -
Why do you lil' shits keep making LAYERS and LAYERS of unnecessary abstraction and then call it goddamn progress???
Dude what the fuck is this UEFI shit?!
Why the hell do I NEED to import a frigging library and read tons of boring and overly complicated documentation just so I can paint a pixel on the screen now uh??
Alright alright yeah so the BIOS is a little basic but daaaamit son if you want something a bit more complicated you make it yourself or install an OS that provides it! Like we've been doing it for years!!!
Dude, you don't get to know what a file system is until I tell you!
The PC be like:
"You wanna dereference the 0x0 pointer? There you go: it's 0xE9DF41, anything else?
You wanna write to the screen? Ok I have a perfectly convinient interrupt setup for that.
Wanna paint a pixel yellow? Ok, just call this other interruption. Theere we go.
And it only took four bytes and a nanosecond to do it."
That shit works, and if you want something more complex, but not too much, that still runs efficiently install DOS.
Don't mess around with the hardware pleeease.
We can still understand what's going on down there. Once UEFI steps in, it'll be like sealing a door forever. Long live BIOS damn it all!1 -
Why we don't write dereference operator while priting string(format specifiers is %s).
For example: char arr[5]={"char"};
printf("%s",arr);//print char.
If we write like printf("%s",*arr);//compile time error.1