wwswimming
Banned
- Jan 21, 2006
- 3,695
- 1
- 0
Originally posted by: Markbnj
Holy crap, your professor is an anal retentive jerk.
maybe, but the situation does resemble the corporate world.
Originally posted by: Markbnj
Holy crap, your professor is an anal retentive jerk.
Originally posted by: wwswimming
Originally posted by: Markbnj
Holy crap, your professor is an anal retentive jerk.
maybe, but the situation does resemble the corporate world.
Exactly. Ever see someone who learned how to program in C by reading the definitive K&R book and nothing else? You'd almost think it was a different language. There are accepted conventions for writing maintainable C programs, and using arrows like that is, or should be, one of them.Originally posted by: Madwand1
Better you learn a lesson losing a few marks in a school assignment than have your professional peers thinking that you coding style sucks.
Originally posted by: Madwand1
Better you learn a lesson losing a few marks in a school assignment than have your professional peers thinking that you coding style sucks.
Originally posted by: DaveSimmons
You're arguing that some guides and companies want you to use even more syntactic sugar than ->
Originally posted by: DaveSimmons
^ except that when >99% of people hold the opinion that -> is the normal way of expressing access from a pointer, it becomes (more) correct even if (*foo).var1 compiles properly.
I can't believe you're putting this much effort into this. You must feel like a salmon. Most (whether it's 80 or 99.999%) will use p->ele. If fact, I would guess a large proportion don't know that (*p).ele is equivalent to p->ele.Originally posted by: degibson
Originally posted by: DaveSimmons
^ except that when >99% of people hold the opinion that -> is the normal way of expressing access from a pointer, it becomes (more) correct even if (*foo).var1 compiles properly.
I'm not sure why you're claiming such a huge majority. After all, there are fewer than ten people posting on this thread, and at least one (myself) feels that -> is just as normal as (*x).y.
Moreover, majority opinions do not define fact. If they did, the Earth would be flat and we would all still be writing COBOL for a living.
But they do define the right way to do things in a company setting where code will be maintained by multiple employees and/or over years, usually both.Moreover, majority opinions do not define fact.
Originally posted by: DaveSimmons
Have you ever seen a magazine article or book using (*foo).var1 instead of -> ? I haven't, and I've been reading them since the DOS days.
That's probably why I'm a cranky geezer about this -- stay off my (*lawn) !
But they do define the right way to do things in a company setting where code will be maintained by multiple employees and/or over years, usually both.Moreover, majority opinions do not define fact.
Originally posted by: seemingly random
I can't believe you're putting this much effort into this. You must feel like a salmon. Most (whether it's 80 or 99.999%) will use p->ele. If fact, I would guess a large proportion don't know that (*p).ele is equivalent to p->ele.
Remember, there's such a thing as being dead right.
But they do define the right way to do things in a company setting where code will be maintained by multiple employees and/or over years, usually both.Moreover, majority opinions do not define fact.
I can't believe you're putting this much effort into this. You must feel like a salmon. Most (whether it's 80 or 99.999%) will use p->ele. If fact, I would guess a large proportion don't know that (*p).ele is equivalent to p->ele.
Originally posted by: squatchman
So if it compiles it should be okay to just throw it around willy-nilly and throw up a middle finger to the person who has to slosh through that garbage in eight months?
Exactly. School is a place where you're supposed to takes chances and learn - not get shot down.Originally posted by: Markbnj
I can't believe you're putting this much effort into this. You must feel like a salmon. Most (whether it's 80 or 99.999%) will use p->ele. If fact, I would guess a large proportion don't know that (*p).ele is equivalent to p->ele.
In which case the OP should get points for understanding something about the language that the bulk of his peers don't. I guess the bottom line for me is that the syntax isn't wrong. It's more voluble, overly clever, yes, but it's valid syntax and unless the prof. has made it clear in the past that he or she won't tolerate it, then the sentence didn't fit the crime.