>company hires a Cnile unix zealot who fits every Jow Forums stereotype minus the thinkpad >start seeing bizarre code constructs in our codebase like large flat dynamically allocated arrays being treated as multidimensional through manually calculated pointer offset multiplication >he does this with 4-D arrays as well and I find myself shuddering in awe and fear that I'll be tasked with maintaining his rube goldberg monstrosities if he ever quits
>large flat dynamically allocated arrays being treated as multidimensional through manually calculated pointer offset multiplication You dumb weeb have 10 seconds to tell me how that's a bad thing.
Leo Torres
bump
Carson Collins
whats his name
Nathan Evans
How does OP have a job as a software engineer if the nigga can't even deal with some basic pointer shit? I guess there is hope for me after all
Isaiah Cruz
God I wish gcc supported non-ascii characters. I don't want emoji or any of that shit, but I want to use instead of -> for pointers for ease of reading.
Ian Nelson
old pasta
Asher Flores
Wouldn't that cause ambiguity with struct pointers? Julia lets you define pretty much every common mathematical symbol and greek letter to be whatever you like, which is cute. julia> l = [1, 2, 3] 3-element Array{Int64,1}: 1 2 3
julia> 2 ∈ l true
Isaiah Sullivan
>dynamically allocated arrays being treated as multidimensional through manually calculated pointer offset multiplication There really is no better solution to do that in C, not for the dynamically allocated arrays. Why are you even using C for a new project. >non-ascii characters anywhere but in the strings Now that's real cancer.
Evan Perez
>wouldn't that cause ambiguity. Not necessarily. Other operators in C are overloaded (ironically like * itself, used for declaring a pointer and dereferencing as well as multiplication)
struct->element would mean literally mean (->struct).element which looks dumb.
Ayden Rodriguez
Readability
Daniel Adams
The arrow character I pasted doesn't seem to even be rendering on Jow Forums. Basically I want this arrow.
>real cancer Nah man.
if (object->value - object2->value > object3->value) Would be much easier to read if I replaced -> with the right pointing arrow.
>everybody should have exactly the same level of programming knowledge as me so I won't have to learn anything new, ever Read, nigga.
Adrian Wood
can't you #define it?
Joshua Hill
lol I literally did this at my last job to replace a horrid pile of 1000's of dynamic mallocs with a single slab allocation
Gavin Russell
Does he at least use a macro to perform the index computation?
Andrew White
julia> = "right arrow" "right arrow"
julia> ⟶= "long right arrow" "long right arrow"
I am pretty sure you can do exactly that in Julia (not that it would help you probably). But I don't have enough experience to write an infix function which modifies a pointer.
William Martinez
I hear you can in clang, but not whatever version of gcc I'm using, and I'd rather not switch away from gcc for various reasons.