-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 if you *really* make zero assumptions, every second call has to be a protocol/interface call. *i know what i am, so no assumption* -> *interface call* -> *repeat*
i think "no assumptions" should be "make no assumptions about the internals of what you are calling". as long as you just code against the "outer shell", you should be fine. Am 31.10.2011 20:54, schrieb Michael Gardner: > On Oct 31, 2011, at 2:03 PM, Timothy Baldridge wrote: > >> This is what Clojure excels at...de-coupling, or as Rich put it >> in his recent talk "Simple made Easy": don't assume things about >> your code. Don't assume that all models will always fit into the >> concept of a polygon...don't assume that you'll always want to >> represent your models via Java2D. > > It's impossible to make zero assumptions about your code; the trick > is figuring out which are the appropriate ones. Making too many > assumptions leads to brittle and hard-to-extend code, but making > too few leads to over-generalized, ponderous code that does way > more than it's ever likely to be used for. > > In a case like this game, it should be easy to refactor away from > the "everything is a polygon" model if and when the game outgrows > it, so I'd argue against introducing the extra complexity of > per-entity renderers until it's actually necessary. > > That's a strength of dynamic, expressive languages like Clojure, > IMO: because there's so much less code, refactoring is much easier. > So instead of trying to predict all future requirements and > possibly ending up with over-generalized code, you can make > assumptions based on current/near-term requirements and refactor > when those assumptions no longer apply. > - -- -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQIcBAEBAgAGBQJOrwmYAAoJENRtux+h35aGTQgQAMC1bUbjN0Mz90fmOQVUCjBN zO+UJXfaiVo6DmR0usZkv1ynwTyuZwQm+llhamabAMLUZXsIiAcbpu0KLjkxJwjJ S6EpZwAsRnqYtUTn3DvdFC3kTkgUR5+KD7fQ97PBHBmyNKcy+GcU7MQP0bsZ9KdQ 26K6qo5TqWmkQEzvg9kVBrB2W5FQj6BuH7UA3LQxHSegpc4Wryxf9qQZFEa5mqFg IdRUFFR2oLOD1rCBcVoeV9hvyPeIdw8ntHoVVepfeDN+PspC3Z58f09dr9E8gar6 Jp9DSgOsZr6ClUHVGUhVOaWPiFeZLunOe9cOCJTaanXKzkE1fejzuQez51sAo3ns mSF40Ezip30kTpJWld1mQV4/mFgsmfymegQiJ71r8V0nEJxOESpmGPb3by0CIAyE sqoFyh/oqbp8lwupwHI636L6O9DPqKYwIVv1ba0q09NhO6rbvDe93+9lWTs3n+XB XLJprZjoU8A7PtUxCEdVCWx75Hi5Lt3FXaFeF/36clWCftRC9yyy+61ZAM5UrmsC 4QjUIG3jJCX7aeHteerWZrkApieYr5JBxL81Zyvf6at0wnINr/x8drWuB8R9gwKy gBIpi+WrjSZhlCgkaQnJocgxrMhNTkdk1XsRcdHDFt1j5kLfb3ZdjK+rSr13XX0H 5FLhhzQZOnnlDibXw1P9 =nWrK -----END PGP SIGNATURE----- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en