Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Teaching programming h;lp

Name: Anonymous 2006-09-18 11:08

I'm going to teach programming to somebody who's going to study it more formally in a year, but wants to be learning part of it in the mean time.

What SIMPLE, CLEAN, STRUCTURED language would you recommend me to use for teaching? Please, refrain from language wars as this is not a fanboy thread but a serious question. Before yuo mention it, I'm not going to start with either Python or Ruby because they're too complex and get too much in the way, and no, I'm not stupid enough to start with Java because a radical OO language (and a crappy one at that) with a shitty enterprise API is not the best either.

I'm thinking Pascal. As much as it sucks, it has strict/anal types (it's better to start anal than to start easy-going and botch it), simple yet not messy syntax, simple stdin/stdout input and output to play with (that's all I'll need), and none of the complexity of OO. Yet it sounds so useless. But I don't know of other languages that meet these requirements.

Name: Anonymous 2006-09-21 13:44

>>64
This is O(1) only for slices that are not written into however, and isn't practical in plain old C for the reasons >>65 gives. For a pristine, fresh runtime, I don't see much of a problem, but you'll want to note that even D puts an implicit zero at the end of char[] -type strings for compatibility with C libraries. (Plus, D is garbage collected and thus not suitable for a number of contexts for which C is.)

>>61
What, D has a string type now? Last I remember, the D people were dead set against doing that, arguing that it was better to check every write through a char[] (combined with static analysis for e.g. loops and such) and fake copy-on-write semantics that way. Anyway, if anything this reinforces my original point, namely that strings are collections of characters rather than collections of arbitrary bytes. This is further driven home by various languages' (excluding Python, apparently) transition to an Unicode encoding, making a bytes-as-characters interpretation tenuous at best and claims that C strings are of bytes rather than characters, even given that the usual C idiom for an unsigned 8-bit quantity is "unsigned char", strange.

Is this sufficient common ground, or would you like to go further? :-)

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List