Re: [dev] golang dwm status

From: Markus Teich <markus.teich_AT_stusta.mhn.de>
Date: Thu, 13 Mar 2014 21:53:00 +0100

Charlie Andrews wrote:
> In both cases, I believe it's much more readable and maintainable to
> have a section for imports and a section for vars (global-ish variabls).
> Readability is subjective I guess, but maintainability is not, and it is
> much easier this way to add imports and vars with fewer key strokes
> later. If I wanted to log a random part all I would have to do is pop in
> "log" into the list and go on my merry way. This is a very small
> workflow optimization, but who knows what a few seconds saved here could
> do.

In this small programm it probably will not matter, but I fixed it to get used
to it for bigger projects. ;)

> I find this very readable:
>
> newSlice := []string{
> "string1",
> "string2",
> "string3", // yes you need the comma here
> }

This is also way better than the solution[0] I came up with. Thanks!

--Markus

[0] https://github.com/schachmat/gods/blob/b48e7442315156209edfee3b77d3f5e9dfe06fe3/gods.go#L145

Received on Thu Mar 13 2014 - 21:53:00 CET

This archive was generated by hypermail 2.3.0 : Thu Mar 13 2014 - 22:00:19 CET