Re: [dev] Re: [st] multibyte patch

From: Aurélien Aptel <>
Date: Fri, 19 Nov 2010 21:52:56 +0100

On Fri, Nov 19, 2010 at 2:38 PM, Hiltjo Posthuma <> wrote:
> Offtopic and not specificly aimed at you:
> I noticed the coding style of st is quite ugly. Lots of
> non-descriptive variable names, recurring logic which could be grouped
> in a function. Inconsistent. One can take an example to look at dwm
> imo, it's pretty clean.

I'm sorry you feel that way.
I am not completely happy about it too but it's far from ugly.
Selection and unicode code have been added recently and I'm currently
trying to integrate them well. Remember that st hasn't made any
release yet.
Apart from that, I really don't know what you mean. Have you looked
the rest of the source? Function directly dealing with X are prefixed
with x, same for tty and t (terminal emulation). Functions that glue
everything together don't have any prefix. Variable names are short
just like in dwm. *Some* logic could be factored (i'm thinking about
scrolling in particular) but it would just be harder to
read/understand. As for the escape sequence handling, if you have a
better solution feel free to mention it.

Concerning the unreachable code, I'm sure Damian will fix what has to
be fixed. There's no rush.
Received on Fri Nov 19 2010 - 21:52:56 CET

This archive was generated by hypermail 2.2.0 : Fri Nov 19 2010 - 22:00:04 CET