3 ms·
At Thumbtack we have 2 main repositories, our PHP repo and our Python repo. Our python repo was built from the group up and we use it for lots of things, in fa
by birken 14y ago
At Thumbtack we have 2 main repositories, our PHP repo and our Python repo. Our python repo was built from the group up and we use it for lots of things, in fact I think it is larger than our PHP repo. However, our core website is written in PHP, and will always be written in PHP for the reason that is always has been. Had I been a co-founder and been a part of making that decision I might have made a different one, but I wasn't and it doesn't matter. Pragmatic decision making is the name of the game.
I admit that PHP doesn't have the best internal interfaces, however convenience functions with a whatever interface you want go a long way.
I like sets in python, well we have tt_set() in PHP with exactly the same interface.
I like defaultdicts in python, we have tt_default_dict() with the same interface.
I like list.get() in python, we have tt_array_get() in PHP.
I like namedtuples() in python, we have a NamedTuple() class in PHP which provides similar functionality (this one is not perfect though, a little more verbose to instantiate in PHP).
I like string.startswith(), string.endswith(), and string slicing in python, we have tt_str_startswith(), tt_str_endswith(), tt_str_slice().
I like csv.DictReader() in python, we have CsvUtils/DictReader() in PHP.
At the end of the day though, PHP is much more similar to Python than it is different, regardless of any of these convenience functions and wrappers. Potentially investing a significant amount of effort to switch something from one to the other strikes me as a very poor investment.
- pavel_lishin 14y ago> PHP is much more similar to Python than it is different Can you elaborate on this? Compared to what?