Advertisement
Guest User

Untitled

a guest
Aug 19th, 2021
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. Tysonzero
  2. ·
  3. 1y
  4. · edited 1y
  5.  
  6. I don't find subjective cosmetics arguments like these to be compelling in any way.
  7.  
  8. I realize cosmetic arguments are always subjective. But at the same time...
  9.  
  10. import Company (Company(company_name, company_owner))
  11. import Person ( Person(person_id, person_name, person_age)
  12. , NewPerson(new_person_name, new_person_age)
  13. )
  14.  
  15. person_name person
  16. person_name $ company_owner company
  17. print . person_name $ company_owner company
  18. Person { person_id = 5, person_name = "foo", person_age = 15 }
  19. create $ NewPerson { new_person_name = "foo", new_person_age = 15 }
  20.  
  21. Now becomes:
  22.  
  23. import Company (Company)
  24. import Person (NewPerson, Person)
  25.  
  26. person.name
  27. company.owner.name
  28. print company.owner.name
  29. Person { id = 5, name = "foo", age = 15 }
  30. create $ NewPerson { name = "foo", age = 15 }
  31.  
  32. 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