[clue-tech] Son's PC and intro to programming

dperkins at frii.com dperkins at frii.com
Fri Feb 17 08:23:08 MST 2006


> Angelo Bertolli wrote:
>> David L. Anselmi wrote:
>>
>>> Don't think of it as the language enforcing an indentation style.
>>> Think of it as the language using indentation to delimit blocks
>>> instead of braces.  I can see that this is more natural to write than
>>> having to add braces to what your indentation already makes clear.
>>> And when you use braces with unclear indentation it's probably harder
>>> to understand the code.
>>
>> Maybe there really is no difference, but something about the logic of
>> a statement changing based on indentation scares me.  At least I'm not
>> used to it ;)
> .... and that really is the key.
> Once you get used to it, indent levels feel just as natural as braces or
> keyword block delimiters.  Like I said, this kept me away from Python
> for longer than I would like to admit, but once I got over it, the
> general expressiveness and power of the language really hooked me.
>
> No tool, including any programming language, is perfect.  And this is
> such a small wart that I'm willing to live with it.
>
> I do believe that a dynamic language is the best choice for a first-time
> programmer.  Of the major dynamic languages, I think Python has the best
> balance of power, available modules, readable syntax, and un-surprising
> semantics.
>
> Your mileage my vary.
>
> -Tommy Phillips

I had no trouble adapting to enforced indentation in Python.  I'm using
Ruby now, but I don't recall any problems with indentation.

I think Python or Ruby are the best introductory languages.  They are
dynamic.  They don't require compilation of your code, so beginners don't
need to learn that.  They are clean and fairly readable.

I like Ruby because it is a bit more object-oriented than Python.  For
some reason, I like -17.abs more than abs(-17).  But I haven't used Python
for a few years, so maybe it does this now too.

On the other hand, anything that is entered is a string, so numbers are
not automatically converted.  This means that I need to do something like
this to convert to a number:

      age = gets.to_i   # Get age and convert to integer.

_______________________________________________
CLUE-tech mailing list
CLUE-tech at cluedenver.org
http://cluedenver.org/mailman/listinfo/clue-tech



More information about the clue-tech mailing list