vlad wrote: |
---|
Programmers as other people have their own weaknesses and caprices. Idiots repeat their caprices. |
@Disch You're also smart enough to know that this is a matter of personal preference. |
this->
whenever you call a member could make a difference.Disch I can not agree with you. The code representation is not a personal preference. It is not you who determines the preference. |
int* ptr;
because I identify the * as part of the type. I'm aware you prefer to read code formatted differently, but that's what I mean by personal preference.I laughed on such "solid argument" as the reference to Tornvalds. Maybe you will say that Straustrup is a good programmer? Please do not make laugh me. |
I laughed on such "solid argument" as the reference to Tornvalds. Maybe you will say that Straustrup is a good programmer? Please do not make laugh me. |
@Zereo I'm curious, because for some reason you don't consider a person that has been the huge force in developing/implementing the code of a OS that millions use around the world. And a person that created a programming language that millions use around the world. If that doesn't make you a good programmer I don't know what will. |
@cire Maybe you're not in the modern world where an IDE can reformat code the way you specify at the touch of a button, or maybe you're too much of an idiot to have figured it out, but if I desire to view it one way, I can view it that way regardless of how it was written originally and I only have to press a button to do it. |
@Disch Personally I prefer to read code in the form int* ptr; because I identify the * as part of the type. I'm aware you prefer to read code formatted differently, but that's what I mean by personal preference. |
int* p1, p2;
would declare @Catfish4 @ Vlad: give examples why Torvalds and Stroustrup are bad programmers. Here, I'll even throw in a smiley face like you sometimes do. :) |
Books of Straustrup are full of his code. It is not so rare that his code demonstrates how it should not be written. |
int* p1;
instead of int *p1;
from your perspective.As for Torvalds then I did not see his code. |
It is you who referenced to him not me. However to name Torvalds as an argument only because he (or somebody else) is well known is not serious. |
@Zereo So you laugh at Torvalds being mentioned as a good programmer and say that is no argument even though you have never looked at anything he has coded? Seems a bit odd. |
int* a;
over int *a;
for the simple reason that int*
is the type, versus *a
which I usually reserve for dereferencing.for ( int* first = a, last = a + N; first != last; ++first ) { /*...*/ }
first
and last
are not both pointers. However, the compiler does catch this and throw an error. Since I know the error message, and the line where it occurs, it's easy to fix.dictionary wrote: |
---|
idiot id·i·ot [id-ee-uht] noun a person of the lowest order in a former and discarded classification of mental retardation, having a mental age of less than three years old and an intelligence quotient under 25. |
int * a;
my preference.int const * a
, int * const b
, int const * const c