Empty struct

Structs are very powerful constructs in Crystal. Very similar to classes, but they are usually faster.

In the first example we create an empty struct. It does not give as a lot, but we have to start somewhere.

struct MyConfig

cfg = MyConfig.new
p! cfg
p! typeof(cfg)

cfg # => MyConfig()
typeof(cfg) # => MyConfig