Re: [go-nuts] The "leave "if err != nil" alone?" anti-proposal

2019-07-06 Thread Lucio De Re
On 7/6/19, Jakub Labath wrote: > "And yes go does have panic/recover - but I never use them for the same > reasons I > dislike exceptions. It's just really hard to reason about such jumps in logic > especially > in massively concurrent programs that go allows us to write." I agree with

Re: [go-nuts] Re: ioutil.ReadDir sort order

2019-07-06 Thread Michael Jones
Indeed, you have two choices: create file names with fixed width numbers: Printf “file%08dv%02d.dat”, f,v Or do a string/number parse of the names before sorting and separate the numbers, you can insert spaces/zeroes and then string sort, or you can parse the numbers and compare them

Re: [go-nuts] The "leave "if err != nil" alone?" anti-proposal

2019-07-06 Thread Michael Ellis
> Exception handling when properly done is beautiful. Yes and so are: - C++ templates - Python meta-classes - Scheme hygienic macros but that doesn't mean Go would be improved by adding them. On Friday, July 5, 2019 at 6:46:49 PM UTC-4, robert engels wrote: > > If you’ve suffered

Re: [go-nuts] Re: ioutil.ReadDir sort order

2019-07-06 Thread Dan Kortschak
It's sorted lexically by the unicode code points. Why would str1 come after str2? '1' < '9'. On Fri, 2019-07-05 at 21:23 -0700, shubham.pendharkar via golang-nuts wrote: > It sorts by name, but there is a big problem with golang string > comparison. > If you consider these two strings: > str1 :

[go-nuts] Re: ioutil.ReadDir sort order

2019-07-06 Thread shubham.pendharkar via golang-nuts
It sorts by name, but there is a big problem with golang string comparison. If you consider these two strings: str1 : "hello.20190305-102.txt" str2 : "hello.20190305-99.txt" Then we should say that str1 > str2. But go returns str1 < str2 On Wednesday, August 19, 2015 at 3:10:41 PM UTC+5:30, Arie

[go-nuts] Citation Needed

2019-07-06 Thread go je
Is the Category "Games" gaining attention in the go community? Are the Developers writing for production level? Do we have an examples? [image: image.png] -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop

Re: [go-nuts] `on err` alternative to `try()` has traction...?

2019-07-06 Thread Liam Breck
I've expanded the proposal to address feedback from the Go team. It now offers a more special purpose construct than the generic if-variant 'on'. See the Critiques section in https://github.com/golang/go/issues/32611 On Tue, Jul 2, 2019, 12:57 PM Liam wrote: > This proposal has attracted