Thread: is C appropriate for intro to computers?

  1. #196
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Quote Originally Posted by zacs7 View Post
    That is moronic...
    Let's pretend what had been said was "It's my opinion in C we should not say pass by reference, but pass by pointer". It's an whole can of worms, but yes it's an opinion like any other. And I'd be a moron. Meanwhile, for the sake of the establishment the same person that would have said the above would keep saying "pass by reference", because despite not being particularly in agreement with it, understood it was an established term.

    More important, said person would also understand sooner or later (or be told) that the term "pass by reference" doesn't have anything to do with C++ references at all. It exists to describe the act of passing a value indirectly through an indicator value. And armed with this knowledge would cease their opinion and go "aha! That explains it then. My opinion doesn't make sense then"

    But not in this case. Said opinion is kept, thrown at every other opportunity, and completely ignores maybe(?) the last 50 years of computing science. So yeah! Who the hell is she to have an opinion on this matter, may I ask?
    Last edited by Mario F.; 10-14-2008 at 07:10 PM.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  2. #197
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by Mario F. View Post
    What opinion?
    I'm sure you know you were not born yet, and C was already saving lifes in Nuclear Power Stations.

    EDIT: Which means... who are you to have an opinion?
    Then let me ask YOU: who are you to decide who may have opinions and who does not?

    Quote Originally Posted by zacs7 View Post
    > I still don't buy it, though. In C, it's pass by pointer, nothing more, nothing less
    Huh? Don't think of it like that, think of it as pass by value, nothing more, nothing less
    Oh yeah, we could do that, but then it becomes a problem when we say "pass by value if you want to function to change the original variable"

    The pointers are still passed by value... . That being said, everyone will know what you mean when you say "passing by reference" in C -- so it's not wrong IMO.
    Yeah, I know everyone understands it (I do, too), but I still insist on calling it pass by pointer.
    That's not just because C++ has references, but because it's actually a pointer, so a more "correct" term IMHO would be pass by pointer. Poor choice of wording for the functionality in the first place.
    But it also conflicts with the C++ references, which is certainly something I don't like, so yeah...


    Quote Originally Posted by Mario F. View Post
    But not in this case. Said opinion is kept, thrown at every other opportunity, and completely ignores maybe(?) the last 50 years of computing science. So yeah! Who the hell is she to have an opinion on this matter, may I ask?
    Again, who are you to decide? Opinions are private, they need not affect everyone else.
    On the other hand, deciding what should be or shouldn't be might be a different matter.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  3. #198
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Poor choice of wording for the functionality in the first place.
    Except that "pass by reference" is older even than C.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  4. #199
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    Quote Originally Posted by Elysia View Post
    But it also conflicts with the C++ references, which is certainly something I don't like, so yeah...
    If there is a conflict, it's C++'s fault since it came later...
    "The Internet treats censorship as damage and routes around it." - John Gilmore

  5. #200
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Quote Originally Posted by Elysia
    That's not just because C++ has references, but because it's actually a pointer, so a more "correct" term IMHO would be pass by pointer.
    A pointer is a reference since it refers to what it points to. Personally, if I feel that there is need to be precise in C++, I would say "pass a pointer" rather than "pass by pointer". This is akin to saying "pass an integer" rather than "pass by integer".
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  6. #201
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by CornedBee View Post
    Except that "pass by reference" is older even than C.
    But the thing was that "pass by pointer" was closer to the language than "pass by reference" since it is a pointer that's used. I think they should have used a better language term in C in the first place.

    Quote Originally Posted by laserlight View Post
    A pointer is a reference since it refers to what it points to. Personally, if I feel that there is need to be precise in C++, I would say "pass a pointer" rather than "pass by pointer". This is akin to saying "pass an integer" rather than "pass by integer".
    Well, not a bad idea, I guess. Pass a pointer it is. Makes sense.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  7. #202
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,612
    Quote Originally Posted by Elysia View Post
    Opinions are private, they need not affect everyone else.
    Perhaps this is the reason why you insist your opinions are fine in spite of everyone's judgment. Things are only private so long as nobody else knows. When you explain your opinion in a public place you will likely meet persuasive voices. What you do in response to that is your business, but if you also say your mind can't be changed, well, that's arrogant. Sometimes it is better to be quiet, especially if you know your opinion sucks. Just pointing that out again.
    Last edited by whiteflags; 10-15-2008 at 10:29 AM.

  8. #203
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,195
    It comes down to the inadequacy of spoken language to fully express the details of evey aspect fo the C/C++ language(s). It has been called pass by reference for decades, neither way is more or less correct, so changing it would only serve to spread confusion, which makes 'pass by pointer' inherently a bad idea. Change can be good, but change for the sake of change is almost always stupid.

  9. #204
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by citizen View Post
    What you do in response to that is your business, but if you also say your mind can't be changed, well, that's arrogant.
    Perhaps. Listening to others is important and I certainly do.
    I don't know what to say - it's like it's etched inside me or something. I have a dislike towards it and it isn't easing even with all the counter arguments.
    So I typically just "sneak" them in, by joking or using my own phrases when explaining things, instead of outright declaring something wrong and correcting it.

    Quote Originally Posted by citizen View Post
    Sometimes it is better to be quiet, especially if you know your opinion sucks. Just pointing that out again.
    Yeah, I learned that. But it's also arrogant to tell people that they aren't allowed opinions.
    Just a thought.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  10. #205
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,612
    Quote Originally Posted by Elysia View Post
    So I typically just "sneak" them in, by joking or using my own phrases when explaining things, instead of outright declaring something wrong and correcting it.
    Well that's missing the point. Part of the reason you found yourself in this mess ten pages ago is because you wouldn't call something by its name. If you do that all the time you will earn a reputation as a troll, particularly someone who doesn't know what they're talking about while instigating arguments.

  11. #206
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    And "pass by reference" is the "correct" name?
    And the members of this board could lighten up, as well, methinks. No need to get worked up because someone uses another way of describing something or naming something.
    There's plenty of people who calls this...
    Code:
    int x;
    ...declaring x while in standardese, it's called defining x.
    I use a different name, that's all.

    So, um... yeah. I'm going to stop my involvement in this discussion here.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  12. #207
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    ...declaring x while in standardese, it's called defining x.
    A definition is a declaration too!
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  13. #208
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    But we're passing a pointer, aren't we? So it's the same to say pass a pointer as pass by reference.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  14. #209
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    I am a big fan of objective C.

  15. #210
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    Quote Originally Posted by master5001 View Post
    I am a big fan of objective C.

    [master5001 [setFan language:obj-c]]

    Gah. I let someone talk me into learning objective C (not that it's necessarily an inherently bad language, but the syntax is ... something not C like, to my mind).

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Numeric addresses for computers
    By great in forum C Programming
    Replies: 4
    Last Post: 08-23-2010, 11:53 AM
  2. Computers as authors
    By hk_mp5kpdw in forum A Brief History of Cprogramming.com
    Replies: 8
    Last Post: 11-22-2004, 08:55 PM
  3. Industrial vs home computers
    By nbo10 in forum Tech Board
    Replies: 10
    Last Post: 09-01-2004, 02:04 AM
  4. Matrix and vector operations on computers
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 11
    Last Post: 05-11-2004, 06:36 AM
  5. Love programming, hate computers
    By PJYelton in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 12-14-2002, 01:04 PM