Re: PHP vs JAVA
| From: | Andy McKenzie | Date: | Tue, 20 Aug 2013 19:24:41 +0000 |
| Subject: | Re: PHP vs JAVA | ||
| References: | 1 2 3 4 5 6 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-321922@lists.php.net to get a copy of this message | ||
On Tue, Aug 20, 2013 at 3:18 PM, Dan Munro <dan@danmunro.com> wrote:
> > 1. There are no statement terminators. Lose your indentation for ANY
> > reason and your program is well and truly screwed, in ways you can't
> > imagine.
> >
> > 2. Python programs fail in the most ungraceful way I've ever seen in an
> > interpreted programming language.
>
> 1. Indent properly. In php, if you put an open or close brace out of place
> your code will break in unexpected ways as well. If it's hard to tell if
> something is indented properly, your code should be refactored so that it
> is.
>
> 2. In my experience this has a lot to do with how some people use python
> and not python itself.
>
>
I can't argue on point two, since that's where all of my worst failure have
come from. But as to indenting, I have had the problem of opening a file
on a new OS, only to find that the default editor there has wiped out my
formatting. With PHP, that's not a big deal: as long as I put my braces
in the right places, everything will continue to work. With Python -- or
any whitespace delimited language -- it's fatal, and I have to hope I can
exit without saving anything.
Andy