I'm curious, what do you guys prefer in your methods/functions/members, object or the object's id, specially in context of statically typed languages (C#/Java/Scala)<p>Pros of object itself:
1) More typesafe calls.
2) Get once from persistence, no need to get again<p>Cons:
Most of the time no need for the actual object, just id would do, so having it costs extra to get from persistence.<p>A mixture of these techniques, as far as I can see, would only have cons of both and pros of none.<p>Also, there's a simple work around for keeping only ids and yet be typesafe- wrap ids into a 'MiniClass' for each class.<p>What are your views of pros and cons of either and a mixture, lets discuss!