refactor type expressions and cache operator*'s result