Re: noob
Re: noob
- Subject: Re: noob
- From: Jeffrey Oleander <email@hidden>
- Date: Thu, 20 Dec 2007 07:46:15 -0800 (PST)
> Peter Mulholland <email@hidden> wrote:
>> Tuesday, 2007 December 18, 13:34:13, you wrote:
>> 1. Learn ANSI C. *Not* C++, and not Objective-C (not
>> straight away, anyway). **MAKE SURE** that you
>> understand pointers, strings and arrays because those
>> are the things people have most trouble with and
>> they're actually very straightforward when you
>> understand them...
>
> I fully agree here. Understanding pointers is a must, and
> the thing most beginner C programs have problems with,
> but when the penny drops and they realise how simple
> they really are, they kick themselves for having trouble
> with them in the first place :)
I think it's best to start with assembly language, without
pre-processor macros, micros and such, to begin. It's more
genuine. There's less clutter. Pointers are just
addresses. You can add off-sets to a base address, etc.
Unfortunately, Intel assembly languages are kind of messy,
too, but still worth the effort because it builds a solid
foundation for understanding all of the languages layered
on it.
The problem with messing with pointers in C, C++ and
Objective-C is that the notation is messy and not
suggestive of what's going on.
Sure, I can say that
SInt64 * fred;
declares that fred is a pointer to a 64-bit signed integer,
but by the time you get to layering on the asterisks and
ampersands, with them on both the left and right of the
assignment operator, with casts and such... pffft. If I'm
dealing with a pointer, there should be an arrow of some
kind involved, and it should point from the thing doing the
pointing to some element of the thing pointed at. With C,
etc., it tells us that it might point to any of billions
and billions of stars in the cosmos.
And then there's "pointer arithmetic" in which addr+3
doesn't necessarily point to 3 bytes (or words) past the
address pointed to by addr, but 3 things of whatever type
addr is declared to point at past addr... except on
Tuesdays.
:B-)
Have fun learning. Take it one small step at a time.
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
- Follow-Ups:
- Re: noob
- From: Thomas Engelmeier <email@hidden>
- Re: noob
- From: David Rowland <email@hidden>
References: | |
| >Re[2]: noob (From: Peter Mulholland <email@hidden>) |