2 ms·
People think "oh, it's compiled, so I can't have dynamic methods" but that couldn't be more far from the truth. You can do all of that at compile time, and Crys
by sam0x17 9y ago
People think "oh, it's compiled, so I can't have dynamic methods" but that couldn't be more far from the truth. You can do all of that at compile time, and Crystal provides an excellent way of doing so. E.g.: https://github.com/sam0x17/crystal-mongo-orm/blob/master/src/mongo_orm/fields.cr#L46 https://github.com/sam0x17/crystal-mongo-orm/blob/master/src...