Re: (rant) Yet another intro page suggestion
- Posted by _tom (admin) Dec 02, 2017
- 1339 views
Thank you Igor, my first draft of anything is not not impressive. The use of "simple" is as bad as "the the" which becomes invisible before one starts critical editing.
I've been struck on page one of the documentation for many years now...
I'm convinced that OE{PHix is perfect for a beginning programmer. But, a beginner is not going to fully understand "simple" "smaller" "less traps" and so on, because that only becomes clear if you compare OE{Phix with another language. In my case I was looking for a replacement for my previous seven languages (that just means I feel old) and I'm not even a programmer. Euphoria is for experts who can appreciate elegance in language design. Or, Euphoria is for lazy programmers who no longer put up with silly languages. Or, Euphoria is for the lucky beginner who skips ahead.
Greg. That "Learn to Code" site is intimidating. I fear that the masses that learn to code will never have the curiosity to learn Euphoria programing.
Irv. Looking at some Python code I am at a loss how one can keep a poker face when you try to explain to a beginner (or to me):
Let's try to change 'Henny' to 'Penny' and see what happens: >>> name = 'Henny' >>> name[0] = 'P' Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: 'str' object does not support item assignment Instead you need to use some combination of string functions such as replace() or a slice (which you'll see in a moment): >>> name = 'Henny' >>> name.replace('H', 'P') 'Penny' >>> 'P' + name[1:] 'Penny' Slice with [ start : end : step ] You can extract a substring (a part of a string) from a string by using a slice. You define a slice by using square brackets, a start offset, an end offset, and an optional step size.
Taken from:
Introducing Python by Bill Lubanovic Copyright © 2015 Bill Lubanovic. All rights reserved.
Python dominates as a beginners language.
How can you compete with a real programing example (that saves sweat and provides fewer surprises) when Python gives you a gem like this?
_tom