I ran into the 'refactoring an unnamed type' problem.  I'd like to know how 
experienced Clojurists avoid it.

I've got an account record/structure.  It has things like an account name, 
account number, etc.  I started off storing it in a vector, because it had 
just two elements.  Account name was (first v).  Account number was (second 
v).  And that worked up to a point.  Over time, it has acquired enough 
pieces and rules that I really need to change its implementation.  I need 
to refactor it.

When it was only a few hundred lines long, in a couple of files, I could 
examine each line.  Now that it's a dozen files and several thousand lines, 
I just don't have the attention span.

In a language with named types, I could search for AccountRecord.  I could 
thoroughly find all the places I used it and refactor it.  Or I could 
change the name of the type to tAccountRecord, and the compiler would 
identify all the places where I used it (with error messages).

In an OO language, I'd be accessing all of its pieces via getters and 
setters, and I wouldn't have to find all of the places where I used it, 
because the implementation would be a black box.

But in a language with unnamed types, it's just a vector and I've just got 
first and second and nth to search for.  That's going to find lots of 
irrelevant stuff.  It's enough to make me pine for Java and a refactoring 
IDE.  =:-o

So how do developers who work with un-typed (or un-named type) languages 
avoid this sort of problem?  Or, failing to avoid it, how do they clean up 
afterward?
tnx

-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to