ericgj/newman — comment on commit 42da093ab019610f2479729dc694e074c6753842
File: lib/newman/settings.rb line 21
By sandal:

I'm not sure we actually need this. In practice these values should be constant, not modified by your code, and so this would be a bit akin to rails spitting out its database.yml file.

I also don't like the dependency on `marshal_dump`, which seems to be an implementation detail of `OStruct`. Since these `OStruct` based objects will either go away or at least be wrapped, I don't want to depend on this method.

But suppose we *were* going to use this code. Then I'd recommend trading this dynamic style for the explicit. It's going to end up being roughly the same amount of code without any of the magic, and won't grow arbitrarily so the static nature of it isn't a burden:

```ruby
{ :imap => imap.marshal_dump,
:smtp => smtp.marshal_dump,
:service => service.marshal_dump,
:application => application.marshal_dump }
```

Similar to my comment about instance variables, let this be another rule of Newman development: don't use dynamic techniques (i.e. metaprogramming) unless you absolutely have to, at least not in initial patches. Dynamic code is better written in a refactoring phase when a need for it has been established, rather than as a form of premature design optimization.