Login | Register
My pages Projects Community openCollabNet

Discussions > users > Re: [propel] Adding Class Typing to Objects

propel
Discussion topic

Back to topic list

Re: [propel] Adding Class Typing to Objects

Reply

Author hlellelid
Full name Hans Lellelid
Date 2004-04-13 06:49:27 PDT
Message Hi Matt,

> What are the lists thoughts on adding typing to the php5 functions so
> errors related to passing the wrong object type are more expressive?
> function getId((Role) $v) instead of function getId($v). Would that be
> hard to do?

In general adding class hints should be fine. I'm not sure specifically
which method you mean here. (Did you mean function setRole(Role $v) ?)

I think for the foreign key related objects adding type hints would make
sense -- maybe save some pain for some people.

I have a mild concern about over-using typehints for performance purposes,
but have absolutely no benchmarks to suggest that type hints actually do
pose a significant performance hit. I guess less of a concern than a
consideration.

Hans

P.S. I think relatively few of the people who have been involved in
development are subscribed to the users@ list, so I'm cross-posting this
to the dev@ list also.

--------------------​--------------------​--------------------​---------
To unsubscribe, e-mail: users-unsubscribe@pr​opel.tigris.org
For additional commands, e-mail: users-help at propel dot tigris dot org

« Previous message in topic | 4 of 4 | Next message in topic »

Messages

Show all messages in topic

[propel] even MORE on many-to-many (now for the UNBELIEVABLE price of $5.99!) "Denny H dot Shimkoski" <dhs at hamfish dot org> "Denny H dot Shimkoski" <dhs at hamfish dot org> 2004-04-13 05:50:34 PDT
     Re: [propel] even MORE on many-to-many (now for the UNBELIEVABLE price of $5.99!) hlellelid Hans Lellelid 2004-04-13 06:14:34 PDT
         [propel] Adding Class Typing to Objects matthewh Matthew Hershberger 2004-04-13 06:40:00 PDT
             Re: [propel] Adding Class Typing to Objects hlellelid Hans Lellelid 2004-04-13 06:49:27 PDT
Messages per page: