shalabh
08/24/2019, 11:20 PMclass User {string name}
), you define both - the business shape ('a user entity has one name') and also the memory layout used to represent it internally. Are there any languages that let you define these separately?Dan Cook
08/25/2019, 1:02 AMWouter
08/25/2019, 3:46 PMshalabh
08/25/2019, 4:35 PMWouter
08/25/2019, 4:43 PMIvan Reese
08/25/2019, 7:59 PMNick Smith
08/26/2019, 12:15 PMshalabh
08/26/2019, 4:47 PMchar *
etc) are exposed and pervasive across APIs.
The motivation behind this is that I should be able to design with and write 'pure business logic' (for lack of a better word) without consideration of memory layouts and other lower level details, but also be able to specify these details separately. So if I change the memory layout, my business logic code doesn't have to change one bit. The business logic should only be coupled to the business shape. Consider how often in C++ a bunch of code will need to change if I switch from using a pointer to a reference. I also would like to do more advanced things, taking the Python example again, I may want to say that one attribute is always stored in a specific arena in memory. So whenever you assign to this attribute the value gets copied to the arena and aggregate operations on this attr become very fast. This would have to be baked into the language from the start - so map
etc can be designed to be aware and use the internal structure of things. The ultimate extension of this idea is that you can take the same 'business logic' code and run it in a distributed fashion, but just providing a different implementation mapping.Wouter
08/27/2019, 2:26 AMshalabh
08/27/2019, 4:56 AMWouter
08/27/2019, 5:18 AMBrendan Zabarauskas
08/27/2019, 10:01 AMyairchu
08/27/2019, 12:28 PM