[PHP-DEV] Re: Introducing EXCPLICIT

2002-06-07 Thread Ilker Cetinkaya

j,

nevermind, you're not the first one who says stop using php if you want oo
and strong types aso aso.
my decision is not only reasoned by your reply.
sorry for dropping just a single line - i had to leave my desk

regards,
ilker

J Smith [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

 I wouldn't take my opinion as law, as I'm not part of the core PHP Group
or
 anything, so I don't speak for anyone but myself. All I'm saying is that I
 seem to remember this issue being brought up before, and the result was
 that PHP is not a strong typed language, and probably won't become one any
 time soon.

 A couple of weeks ago the discussion kind of stirred up again with the
idea
 of string types.

 You can sort of do your own data type checks now using is_int(),
is_array(),
 etc., which although falls short of true strong typing, is better than
 nothing.

 If you want to move to C#, super. Use the tool that fits the job. But I
hope
 to hell you aren't doing it just 'cause I sent you a reply on a newsgroup
 that you didn't like. Personally, I wouldn't mind a slightly stronger
typed
 PHP (at least for function arguments) as long as BC and portability were
 maintained and it was totally optional.

 J


 Ilker Cetinkaya wrote:

  thank you for your reply,
 
  i'll change to c# as soon as i've finished my current projects.
 
  regards,
  ilker
 




-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DEV] oo != php

2002-06-07 Thread Ilker Cetinkaya

i don't get it,

ze2 introduces
private members,
consts,
statics,
namespaces,
delegation (and thus mi),
class in class.

and all this stuff because it don't wants to be another java

sebastian is currently working on a book for php-oo, wants to show us
how design patterns are realized with php, even how php-projects are
designed using uml...

and here i must read you want real oo, take java...

i know i'm penetrating you again with this worn-out shoes,
anyhow, last postings (especially the php future thread) showed me i'm not
the only one begging you for real oo to be added *as an option* to php.

i'm quite new to this list, so please excuse if i had been sticking on a
topic already shot down.
and for gods sake (if you've been reading till here) - ***this will be my
definitive last posting regarding this issue***. thank you for your
patience, in case i'm struggling on you.

however, i'm quite disappointed and demotivated by some of your opinions,
stating to keep php simple and easy,
not to go for a messy java-derivate,
not to make things too complicated aso aso

please notice, this is no offense,
but after getting known of the ze2 features, i personally saw php finally
growing out of that
php, language for kiddies-image.
imho php is a real good language for its target purpose, but it has
potential to be much better.

i'm not in too deep in php and its history, just following (and had been
infrequently using) it since v3.

but nearly every one of my collegues and friends said to me forget php for
serious things. again, since getting known of ze2, i dreamt of php being
not only cheap, easy, fast and extensible, but comprehensive, guiding, more
explicit, powerful so it could compete against others in valueable markets
like eai, ecommerce, eprocurement and all that funny buzzwords starting with
e. not only being the first choice language for so called self-made web
designers/developers/admins, *nix freaks, small we rule the world and make
best web-applications internet e-startup and one year later f**kup
companies.
please don't misunderstand me, i don't want to offend anyone by writing down
such statements. i'm also a selfmade man and respect all of you and your
work - anyhow - realize it's the reality (at least in my special environment
it is).

again, yes, the're hundreds and thousands of cool applications written in
php - really good stuff. but couldn't it be better once php improves and
extends to a mature oo-functionality ?

imho, what php currently supports regarding oo is the lowest level of
integration (eg like javascript and as of flash),
and ze2 is currently supporting the very very most basics of oo (classing,
private members, somehow overloading, statics) and is (probably) going to
support multiple inheritance, synchronized delegation, namespaces...

that's imho really a very big step towards real language improvement.
serious respect. however, i think it's not enough to say php is a language
for easily creating good small and mid-sized web-applications *as well as*
building up professional, powerful, extensible and complex applications at
enterprise level.

yes, indeed there's java on the market for this, there's cf, there's .net,
wo aso aso...

but who cares? would you really loose your community by expanding the
community ? would you kick off all that guys coding php for their own
website by giving companies and professionals at least the chance to get
things done with php? wouldn't you inspire your existing userland to code
better applications ?

sorry, i don't get it - i know there has to be some cut at some point - but
making oo-imrovements incomplete is worse than not making it at all.

having monitored this list now for some weeks and in consequence of the
recent discussions, i personally realized that my efforts towards php (time,
projects, code, ideas aso aso) were not for nothing but for a language
having its own life and own rules, not addressing the state-of-the-art,
academically satisfied, commonly used, professional language constraints
like object-orientation and explicit variable declaration.

my 2c and may this topic never arise again,

regards
ilker





-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DEV] Introducing EXCPLICIT

2002-06-06 Thread Ilker Cetinkaya

i'd like to discuss with you a growing problem regarding php applications.

i see the features taken into account for ze2 have been made regarding the
needs of advanced php developers who design complete applications with php
instead of just dumping out some dynamic content.

php is ease of use because you don't have to care about important language
needs like types.
that makes following code possible

$a = hello u ;
$b = 2;
echo $a.$b;

imho that is a good feature for coding simple things fast from brain to
keys.
however in a more complicated and larger context, as in frameworks and
libraries for example,
this leads the coder to produce more code to get the things bugfree.

consider a function inserting a row into a table with id and name:

function ins($id, $name) {
if (is_numeric($id)  is_string($name)) {
// do insert
return true;
}
return false;
}

through loose typing a value of $id = 1  (note whitespace) is possible and
insert would fail.
no problem, extending condition to is_numeric(trim($id)) does it.
anyways, a value of $name=444 causes failing this condition too, although it
should be dyncasted into a string.

instead consider this:

bool function ins(int $id, string name) {
//do insert
return true;
}

and everything is right.

what i want to point out is the loose vs. strong type issue - certainly
discussed prior this post.

i'd like to propose the introduction of an explicit command for ze2 to
resolve this issue.
as known of vb for example, explicit forces coder to explicitly declare
variables.
this would require to be explicit as a language directive or option.

example:

#!php --explicit (or something similar, perhaps a php.ini entry)

mixed $mixed = hello;
string $str = string;
int $num = 5;
bool $ok = false;
array $ar;
float $rate;

bool function ins(int $id, string $name);

class test {
private bool $done; //private
var string $name; //public;
private object $o;

string print() {
return $name;
}
}

object $o = new test();
echo $o-print();


i don't have any clue about implications regarding parsing and handling such
explicit behaviour,
especially considering type juggling, but juggling could be disabled when
explicit is turned on.

is there a chance to realize this ? and moreover, is this a desired, planned
feature ?
i'd welcome this

just my 2c;

ilker






-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DEV] Re: Introducing EXCPLICIT

2002-06-06 Thread Ilker Cetinkaya

thank you for your reply,

i'll change to c# as soon as i've finished my current projects.

regards,
ilker

J Smith [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

 I seem to remember strong typing being brought up before, and I also seem
to
 remember it being shot down.

 The consensus seemed to be if you want a strongly-typed language, use
Java.
 Or C. Or C++. Or something other than PHP that has strong data typing.

 Have things changed since then?

 J


 Ilker Cetinkaya wrote:

  i'd like to discuss with you a growing problem regarding php
applications.
 
  i see the features taken into account for ze2 have been made regarding
the
  needs of advanced php developers who design complete applications with
php
  instead of just dumping out some dynamic content.
 
  php is ease of use because you don't have to care about important
language
  needs like types.
  that makes following code possible
 
  $a = hello u ;
  $b = 2;
  echo $a.$b;
 
  imho that is a good feature for coding simple things fast from brain to
  keys.
  however in a more complicated and larger context, as in frameworks and
  libraries for example,
  this leads the coder to produce more code to get the things bugfree.
 
  consider a function inserting a row into a table with id and name:
 
  function ins($id, $name) {
  if (is_numeric($id)  is_string($name)) {
  // do insert
  return true;
  }
  return false;
  }
 
  through loose typing a value of $id = 1  (note whitespace) is possible
  and insert would fail.
  no problem, extending condition to is_numeric(trim($id)) does it.
  anyways, a value of $name=444 causes failing this condition too,
although
  it should be dyncasted into a string.
 
  instead consider this:
 
  bool function ins(int $id, string name) {
  //do insert
  return true;
  }
 
  and everything is right.
 
  what i want to point out is the loose vs. strong type issue - certainly
  discussed prior this post.
 
  i'd like to propose the introduction of an explicit command for ze2 to
  resolve this issue.
  as known of vb for example, explicit forces coder to explicitly declare
  variables.
  this would require to be explicit as a language directive or option.
 
  example:
 
  #!php --explicit (or something similar, perhaps a php.ini entry)
 
  mixed $mixed = hello;
  string $str = string;
  int $num = 5;
  bool $ok = false;
  array $ar;
  float $rate;
 
  bool function ins(int $id, string $name);
 
  class test {
  private bool $done; //private
  var string $name; //public;
  private object $o;
 
  string print() {
  return $name;
  }
  }
 
  object $o = new test();
  echo $o-print();
 
 
  i don't have any clue about implications regarding parsing and handling
  such explicit behaviour,
  especially considering type juggling, but juggling could be disabled
when
  explicit is turned on.
 
  is there a chance to realize this ? and moreover, is this a desired,
  planned feature ?
  i'd welcome this
 
  just my 2c;
 
  ilker




-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] Patch-tastic!

2002-06-05 Thread Ilker Cetinkaya


Sebastian Bergmann [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Andrei Zmievski wrote:
  The latest one changes some operators.

   Nice, but why not overload + for strings to do the concatenation?

i totally agree, overloading + for string concat is really desireable.
imho using - for member object access is ok. i see php more likely to be a
c++ derivate than java or c#.
just my .02c




-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DEV] Compile php_zend2 win32 with domxml

2002-05-31 Thread Ilker Cetinkaya

hi ng !
i just compiled php with zend2 on win32 using vc7 - after few minor pitfalls
it did work out very well.

now my problem is that i want to enable domxml extension and therefore
wanted to compile it with latest libxml2.
compile runs well but the linkage is somehow broken.

linker gives error lnk2019 unreferenced external symbol
_zend_objects_get_address referenced in function _php_xpath_get_object.
(inirectly via macro Z_OBJPROP_P).

do i have a chance to compile ?

any help and suggestions welcome,
thx
ilker



-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DEV] Compile php_zend2 w32 domxml, the 2nd

2002-05-31 Thread Ilker Cetinkaya

hi again

you may haven't noticed yet, but i recently posted a question in here...

!--- snip ---
hi ng !
i just compiled php with zend2 on win32 using vc7 - after few minor pitfalls
it did work out very well.

now my problem is that i want to enable domxml extension and therefore
wanted to compile it with latest libxml2.
compile runs well but the linkage is somehow broken.

linker gives error lnk2019 unreferenced external symbol
_zend_objects_get_address referenced in function _php_xpath_get_object.
(inirectly via macro Z_OBJPROP_P).

do i have a chance to compile without errors ?

any help and suggestions welcome,
thx
ilker

!--- snip ---

i've been following the list now for some hours, and it seems to me that
andi and sebastian are heavily working on zendengine2 object management.
i do not consider my question as really urgent or important. nevertheless,
reading the latest posts (which obviously seem to be cvs commits and
comments of you two), i tend to assume that my question is an actual
question.
ok, i know (or at least can guess) you have better things to do than
answering a question of a newbie.
however i'd be _really_ glad if you just would give me a hint or would say:
hey buddy - wait - it's on the way to work or something similar. a
solution would be the greatest anyway.

so, _please_, if anybody knows anything about this issue i mentioned above,
or even has a solution or hint for me,
_please_ reply.

i might be in the wrong newsgroup here. if so, please give me an advice
where i can post this question accordingly.

please excuse my bad english,

thank you indeed,
ilker




-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php