This post originated from an RSS feed registered with Agile Buzz
by James Robertson.
Original Post: Of What Import, Are Imports?
Feed Title: Travis Griggs - Blog
Feed URL: http://www.cincomsmalltalk.com/rssBlog/travis-rss.xml
Feed Description: This TAG Line is Extra
Among the near doubling of the semantic concept space (this is a highly subjective measure, done through painstaking analysis of... oh well, so it's totally unfounded opinion, sue me) in the VisualWorks flavor of Smalltalk is this thing called "imports". I'm curious what others do with them? I see a couple of different general categories or "strategies" one might fall into with the things.
A) I use namespaces. If classes in one namespace refer to classes in another, I import the namespace into the other namespace. IOW, generally, I choose to import the container into the, er, uh, container.
B) I'm a dotted name fanatic. I import NOTHING. I always use full paths.
C) Each time I encounter an unresolved class, I import referenced class into target scope. I might promote that to the namespace of the importing class if LOTS of classes in said namespace are all doing it. But in general, I do class-to-class imports.
D) What are imports? I just put everything in Smalltalk. Who needs namespaces anyway.
E) I love finely tuned and exactly maintained imports; I use a combination of all of the above, each case as appropriate. I feel that a well designed and maintained import graph is part of a healthy program.
What did I miss? Maybe there's some other patterns? I think I mostly do the (A) option. What do others do?