emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: IRC client for Emacs


From: Richard Stallman
Subject: Re: IRC client for Emacs
Date: Thu, 15 Aug 2002 13:54:56 -0600 (MDT)

    Maybe for applications within Emacs.  In erc.el there is code like
    this:

    (defun erc-make-message-variable-name (catalog entry)
      (intern (concat "erc-message-"
                      (symbol-name catalog) "-" (symbol-name entry))))

This seems like a space-inefficient way to store the data, creating a
symbol for each translatable string.  Aside from that, how would you
load a new message catalog?  I suppose you would set each of these
variables.  That means Emacs can only hold one message catalog
for the category at any time.

I think it would be better to use a hash table to record the message
catalog, and to look up the original string in the hash table to
translate it.  This would be more space-efficient, I think.  And it
would be quick and easy to switch between different message catalogs.

The drawback would be that lookup is slower.  But I think this won't
matter much, because these operations are mostly for user output.

A program that needs to use various message translations, and wants to
run fast, could look them up once at the outset and then save the
translations in local variables.  This would combine the advantages
of both methods.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]