Sep. 8th, 2012

jyrgenn: Blurred head shot from 2007 (Default)
In the last few days I have been familiarizing myself with the Go programming language and found that in general a very pleasant experience. Up to now, a few areas were a bit unfamiliar, but doable, others outright delightful.

Yesterday, I wanted to do something that involved writing a smallish program. Instead of going for the usual Perl, I wanted to try it in Go. The functionality involved writing a timestamp to a file, so I looked for the strftime() equivalent and found this:
http://code.google.com/p/go/issues/detail?id=444

Seriously, Go, time.Format()?
http://golang.org/pkg/time/#Time.Format

While strftime() may be "a bad interface" in someone's eyes (not in mine -- I always found it perfectly adequate), I can see time.Format() only as a persiflage of how bad an interface can be if carried to the extreme.

Especially this gets me, about strftime(): "no one remembers all the letters, so the only way to use it is with documentation in hand." And with time.Format(), am I supposed to remember -- instead of the partly arbitrary format letters of strftime() -- the parts of the example timestamp, which are all totally arbitrary? I mean, what were they drinking?

Profile

jyrgenn: Blurred head shot from 2007 (Default)
jyrgenn

September 2022

S M T W T F S
    123
45 678910
11121314151617
18192021222324
252627282930 

Most Popular Tags

Page Summary

Style Credit

Expand Cut Tags

No cut tags