>
> > 2010/5/14 Johannes Schlüter <johan...@schlueters.de>
> >         > <?php
> >         > require
> >         > (
> >         >     'utila.php',
> >         >     'utilb.php',
> >         >     'utilc.php',
> >         > )
> >
> >
> >         What's te benefit, other than saving a few chars on the cost
> >         of being
> >         more explicit. I don't see any benefit.
> >
> >
> > make php more productive is always good.
> Less characters doesn't make anything more productive. Saving the few
> characters might save a second while typing, but the additional keyword
> makes ready cleaner. A line of code is read way more often than typed.
>
>
>
define
(
  'a'=>1
  'b'=>2
  'c'=>3
)

its cleaner to me. like C ENUM.


enum DAY            /* Defines an enumeration type    */

{
    saturday,       /* Names day and declares a       */
    sunday = 0,     /* variable named workday with    */
    monday,         /* that type                      */
    tuesday,
    wednesday,      /* wednesday is associated with 3 */
    thursday,
    friday
} workday;


it is cleaner for everyone.
maybe the enum type could even be created for this.



> > there are others cases where error is imprecise
> >
> >
> > 1. if($a==$b){
> > 2.
> > 3. if($c==$d){...}
> >
> >
> > the error will be raised at line 3 without a precise messagem. this is
> > a trivial code and have imprecise message error.
>
> Yes. So we should make it worse since it isn't perfect in one place?
>

there are fixes to be the error line be precise.


>
> > utila.inc will be include utila.inc.php,
> > utila.class will be include util.class..php
> >
> >
> > if you use utila.class without php in your project, its is a security
> > problem.
>
> That's wrong.
>
> > if string dont finish with .php, .php will be included,
>
> That breaks tons of code. and just makes life harder.
>
>
>
ok, maybe its not the best ideia.



> > forget IDE. think in a simple text editor without any resources...
> > php is php, IDE is IDE.
>
> If you talk about being productive you use tools which make you
> productive.
>
> im talking about more productive. evoltion of produtivity



> > few character less can be good.
> >
> >
> > se one php example:
> > HTTP_POST_VARS => _POST
> >
> >
> > it always good write less and do more.
>
> So we should rename all functions,too? mysql_query() is long, mq()
> should work well?
>
> no, isnt a rename..
its a new constructor of php.

mq is ambiguos, but require(..,..,..),define(..,..,..) its cleaner, not a
rename.



> > the main php ideia is to write less and do more,or we would be still
> > writing pages in ANSI C or assembly
>
> no. That's Perl, and Perl is known as unreadable write-only language.
>
> johannes
>
>
require(...,..,..),define(...,...) dont make php harder to read and make
easy to write.


-- 
Att.
Mathias Grimm

http://mathiasgrimm.com.br
http://phpempregos.com.br

Reply via email to