ChanServ changed the topic of #crystal-lang to: The Crystal programming language | https://crystal-lang.org | Fund Crystal's development: https://crystal-lang.org/sponsors | GH: https://github.com/crystal-lang/crystal | Docs: https://crystal-lang.org/docs | Gitter: https://gitter.im/crystal-lang/crystal
ur5us has quit [Ping timeout: 244 seconds]
ur5us has joined #crystal-lang
_ht has joined #crystal-lang
_ht has quit [Remote host closed the connection]
ur5us has quit [Ping timeout: 244 seconds]
walez has joined #crystal-lang
hightower2 has quit [Quit: Leaving]
ur5us has joined #crystal-lang
ur5us has quit [Ping timeout: 244 seconds]
Sankalp- has joined #crystal-lang
Sankalp has quit [Ping timeout: 268 seconds]
Sankalp- is now known as Sankalp
walez has quit [Ping timeout: 244 seconds]
rez has joined #crystal-lang
walez has joined #crystal-lang
_ht has joined #crystal-lang
<FromGitter> <rjnienaber> Looking for some advice: I'm working on a library that interfaces to a web api. The library will have a client that accepts fully typed data structures that will be serialized into json (or xml!) and sent to the web api. These data structures might hold 1 variable or they may hold 22+ variables and those variables could contain nested data structures. ⏎ ⏎ Given I also don't know how the library will be
<FromGitter> ... used, what makes more sense as the base type for the data structures: structs or classes?
<FromGitter> <rjnienaber> Writing that all out makes me think that classes are the right choice because for bigger pieces of data, that could induce a lot of copying?
ur5us has joined #crystal-lang
_ht has quit [Quit: _ht]
walez has quit [Quit: Leaving]
<FromGitter> <Blacksmoke16> if you're wanting to be able to pass around the payload data obj and expect it to be mutable, id go with a class
<FromGitter> <Blacksmoke16> tho if you just want to have a base type so you can restrict methods and stuff with it then you could, assuming the base types are empty, use a module and leave it up to the end user
<FromGitter> <Blacksmoke16> @rjnienaber