On Feb 15, 8:29 pm, Martin Budden <[email protected]> wrote:
> a) Well, I'm all in favor of the get it working and then get it
> working well development pattern. Presumably you would mind if Fred
> and I propose a bit of refactoring as part of the work we are doing.

Even better if you either submit patches or talk to me about it and
make the changes yourself.

Another, maybe better, option is to write another version of a store
that essentially does the same thing and then compare the two, or make
both available and let the "community" decide. The interface is pretty
straightforward and testing is quite simple as well. One of the major
codes of the TiddlyWeb code style is to make that kind of compare and
contrast easy. Many parts of TiddlyWeb are explicitly and
intentionally not the best they could be to a) get on with it b) to
encourage other people who may have more expertise in some areas to
create replacements that are better.  The parts of TiddlyWeb that
_are_ trying to be quite good are the parts that establish boundaries
between things.

> b) You ask:
> "If the 'text' serializer was called 'files' what would the simpletext
> serializer be called? 'alsofiles'?"
>
> presumably you mean:
>
> If the 'text' store was called 'files' what would the simpletext
> store be called? 'alsofiles'?

Yeah, sorry about that. It has been a long and brain frying weekend
for some reason.

> Well, it would probably be called something like 'flattenedfiles' (or
> even 'simplefiles'). But the point is both of them should contain the
> word 'files' rather than the word 'text'

What would you call one that used RCS files? Or files that are
serialized in a different form?

In any case, why does the name itself matter, if people know what the
name means? (c.f. "TiddlyWiki")

> I'd rather have
>
> recipe_file.write(self.serializer.to_string(recipe))

The reason to_string does not take an argument is so that the
serializer object can be interpolated as follows (though this is
probably not a very good example, it does show the mechanism):

for object in (recipe, bag, tiddler):
    serializer.object = object
    print serializer

Obviously in that particular instance there are lots of different ways
to achieve the same thing, it just so happens that I chose one
mechanism.

I've had some doubts about it at various times, mostly related to the
lack of symmetry with how the stores do things, but it is working and
does not prevent the thing you want to do which is put the serializer
object itself on self in a store. No problems, go for it.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/TiddlyWikiDev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to