Про зависимые типы данных.

Oct 21, 2008 19:41

Цитата (источник):
> arity :: (F a *) -> Int
> arity (a -> as) = 1 + (arity as)
> arity a = 0
You cannot do this in Cayenne, there are no operations that scrutinize
types. They can only be built, and never examined or taken apart.
This is a deliberate design choice. The consequence is that type
cannot affect the control of a program, so they cannot really influence
the result of a program, and are thus needless at runtime.
Мне где-то задали вопрос, на который отвечает эта цитата, но отыскать источник вопроса я не смог.
Previous post Next post
Up