Interesting talk on Python vs. Ruby and how he would like Python to have just a bit more syntactic flexibility.

Lie Ryan lie.1296 at gmail.com
Fri Feb 19 17:05:04 EST 2010


On 02/19/10 14:57, Steve Howell wrote:
> In a more real world example, the intermediate results would be
> something like this:
> 
>    departments
>    departments_in_new_york
>    departments_in_new_york_not_on_bonus_cycle
>    employees_in_departments_in_new_york_not_on_bonus_cycle
>    names_of_employee_in_departments_in_new_york_not_on_bonus_cycle
> 

I fare better, in less than ten-seconds thinking:

departments
eligible_departments
eligible_departments
eligible_employees
eligible_employee_names

as a bonus, they would be much more resilient when there are change of
eligibility requirements.

Names doesn't have to exactly describe what's in it; in fact, if your
names is way too descriptive, it may take significantly more brain-cycle
to parse. A good name abstracts the objects contained in it.



More information about the Python-list mailing list