Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
so, simplified, you have a Gazelle which has a Kill function that returns Meat which is a subclass of FoodIngredient. and you have a Fireplace object which has a Cook function that takes FoodIngredient objects and returns Food objects (which you want). so you figure out that you need to call Kill on the Gazelle, take the Meat return value, put it into Cook function of the Fireplace, take the result, and voilá, you got what you wanted.
which is the core of how the AI can know how to operate/use stuff around it even though you have no datastructures that define the uses and requirements. you just need to structure the code itself correctly. No extra work on top of coding the functionality itself (in the right way).
MarkoVlaic0461123dThis is fucking brilliant
Diactoros884123dClever! But change the name.
@MarkoVlaic0 you mean the name or the idea?
just so i know whether my paranoia about someone "stealing" it when i clicked "post" was justified.
you can have the name no prob.
... then i will find you...
... and i'll use my very particular set of skills on you...
... and it will make you sorry that i ever learned php...
if you code a fish class in the right way, then yes.
but don't forget to implement some function tgat returns Nutrition object into the Sushi class, otherwise it won't realize it's edible, and that would be a shame
Your Job Suck?
Take a quick quiz from Triplebyte to skip the job search hassles and jump to final interviews at hot tech firms
Get a Better Job
superroot1Proper use of object oriented design patterns
Yeah698Just finished reading this gem from start to end. It is over 20 years old and it is crazy how it is still up t...
bitfucker7To all the design pattern nazis.. Don't you ever tell me that something is impossible because it violates som...