2013/12/19 Damien Cassou <[email protected]>

> On Thu, Dec 19, 2013 at 11:07 AM, Sergi Reyner <[email protected]>
> wrote:
> > - Class names are awfully chosen. Besides almost every one of them having
> > IRC as a "namespace" prefix, some like IRCUser don´t convey enough
> meaning.
>
> having a prefix is a common pattern. I don't see the problem of
> IRCUser as a name.
>

I was considering using ChromiaXXX as a prefix instead.

The problem with xxxUser is that right now I manage two "User" concepts:
what NickServ understands as a user, and what Chromia understands as a
User, both of them different from an "IRC User" understood as someone or
something who is connected to IRC. That´s what I meant by not enough meaning


> - IRCConfiguration could be replaced by a dictionary since it´s nothing
> more
> > than a bunch of data. But the, on the other hand, it could encapsulate
> > validation on the settings to say something.
>
> I'm not sure what would be the gain of transforming a proper class
> into a dictionary. We usually do the opposite : creating classes out
> of collection usage. I would keep the class and give it a
> responsibility.
>

I see. I was thinking about how less classes make a system simpler and that
I should remove it because the functionality is identical to that of a
Dictionary. But as you point out, the dilemma can also be solved by adding
new behaviour :)


> > - Is PetitParser overkill for the time of parsing required? Are regular
> > expressions a better fit for this task?
>
> I don't know what parsing is required. But if it works, I would keep
> it the way it is.
>

There are two scenarios, one is parsing incoming messages from the server
(I haven't considered DCC yet), which are in "IRC message format",
documented in RFCs. I built the parser for it by translating parts of the
BNF grammar into PetitParser.

The other one is parsing the message that a user types in the client as a
command to to the bot, for example "!sayto #pharo Hello, my name is
Chromia". Right now, I do that using regular expressions.



> > - Do I keep the Glamour browsers? I´m rather partial to them :D
>
> Glamour is really great to write interfaces and I really like it. Now,
> if you develop a browser on top of glamour, you also need the moldable
> glamour debugger.
>

More stuff to learn! \o/


Cheers,
Sergi

Reply via email to