Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Tysonzero
- ·
- 1y
- · edited 1y
- I don't find subjective cosmetics arguments like these to be compelling in any way.
- I realize cosmetic arguments are always subjective. But at the same time...
- import Company (Company(company_name, company_owner))
- import Person ( Person(person_id, person_name, person_age)
- , NewPerson(new_person_name, new_person_age)
- )
- person_name person
- person_name $ company_owner company
- print . person_name $ company_owner company
- Person { person_id = 5, person_name = "foo", person_age = 15 }
- create $ NewPerson { new_person_name = "foo", new_person_age = 15 }
- Now becomes:
- import Company (Company)
- import Person (NewPerson, Person)
- person.name
- company.owner.name
- print company.owner.name
- Person { id = 5, name = "foo", age = 15 }
- create $ NewPerson { name = "foo", age = 15 }
- Lets be honest with ourselves here about which is easier to read and more aesthetically pleasing.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement