Also, if command line is a barrier for an aspiring (web) programmer, he/she should start looking for a new career path.
2. Is it unthinkable that a person could start learning web dev and pick up the command line along the way? I started out learning PHP/MySQL on my old Windows machine, terrified of the CLI, and now I do almost everything on it (and have converted my old PC to Linux). If the command line were a barrier at all points in the learning trajectory, then you might have a point. But I also don't think that command line mastery should be held up as a sine qua non of learning web dev.
2. You don't have to be a command line expert to start using it. All the books at http://learncodethehardway.org/ show that command line can be integrated in the language learning process seamlessly. No reason to be terrified of it, on the contrary, new coders should embrace it as soon as possible.
In some ways this is true but I would be hesitant. What you're really advertising is that PHP has an implicit `echo("` statement which looks like `?>` and also implicitly occurs at the beginning of the file. A lot of new folks write really hard-to-follow code. Here is the seed of badness from which such code eventually germinates and blossoms:
<ul><?php
foreach ($users as $user) {
?><li class="user"><a href="/users/<?php
echo $user['id'] . '">' . $user['name']. '</a></li>';
?><?php
}
echo '</ul>';
If you do not see why this is bad, imagine that you have a loop within a loop and they get separated by more than 20-30 lines of PHP. Notice how some of the HTML occurs within the PHP statement but pairs with tags outside of the PHP statement, and imagine functions which are producing such code. Et cetera.Python+Flask will force you to either do it in a Jinja template, which avoids the problem because you cannot 'return back to Python' midway through:
<ul>{% for user in users %}
<li><a href="/users/{{ user.id }}">{{ user.name }}</a></li>
{% endfor %}</ul>
Or else you could define the file within Python using strings, in which case your syntax highlighter will be able to tell you exactly where these strings begin and end: output += """
<!-- ... more code ... -->
<ul>""" + "".join(["""
<li><a href="/users/%i">%s</a></li>""" % (u['id'], u['name'])
for u in users]) + """
</ul>
'<li><a href="/users/%i">%s</a></li> % (u['id'], u['name'])
for u in users]) + """
Of course, Jinja is more readable in this case, and that's kind of the point. For most web apps, you want a sort of preamble which calculates and formats a bunch of information, selects a template, and renders the template to the user. For PHP, this preamble is Apache, and if you want more, you probably need to generate an include() file to force yourself to stay sane. (PHP doesn't force this however, and many people write bad code which simply does the calculations in the HTML wherever they are needed -- and then you get massive code duplication and the joys of trying to match curly braces through large blocks of HTML.)
What I meant to say is that you can't use either of them in direct conjunction with HTML the way that you can use PHP. This was what I meant when I said "genuine functionality from scratch." Would I prefer Python+Django/Flask for lots of use cases. Absolutely.
As for the "useless overhead," there are things like the command line (which Python and Ruby web dev absolutely demand) standing in the way of some of the other languages. Personally, I strongly prefer the command line for almost everything, but for beginners this is another barrier.
My argument was not for the superiority of PHP over other languages, but rather against its casual dismissal from consideration.