WTF go?
-
.\ymm_test.go:16: cannot use mfp (type *mockFuse.MockFuseProvider) as type fuse.DBProvider in argument to Init: *mockFuse.MockFuseProvider does not implement fuse.DBProvider (missing fuse.prepare method) have mockFuse.prepare(string, interface {}) (string, []interface {}) want fuse.prepare(string, interface {}) (string, []interface {})
Uh... what? @ben_lubar ? MockFuseProvider is in package
fuse/mockFuse
so that people developing downstream modules can use the mock version without writing it themselves.
-
-
@asdf I wouldn't say 'go' so much as 'blow up'.
Eh, it's not so bad: those who want to get to have a laugh at Go.
-
I came here thinking this was going to be 's version of Pokemon Go. Go out into the real world and capture wild WTFs! Let your WTFs battle with other players' WTFs to see which one is worst! But then I realized that's kind of what this site already is.
-
@devjoe
Obviously @mikeTheLiar is the all time winner of WTF Go
-
@Yamikuronue said in WTF go?:
.\ymm_test.go:16: cannot use mfp (type *mockFuse.MockFuseProvider) as type fuse.DBProvider in argument to Init: *mockFuse.MockFuseProvider does not implement fuse.DBProvider (missing fuse.prepare method) have mockFuse.prepare(string, interface {}) (string, []interface {}) want fuse.prepare(string, interface {}) (string, []interface {})
Uh... what? @ben_lubar ? MockFuseProvider is in package
fuse/mockFuse
so that people developing downstream modules can use the mock version without writing it themselves.Other packages can't access methods and fields that don't start with a capital letter. Interfaces with unexported methods can only be implemented by the package that defines the interface unless you do something crazy with type embedding.
-
@ben_lubar said in WTF go?:
Other packages can't access methods and fields that don't start with a capital letter.
That's one of the most ridiculously arbitrary conventions I've ever seen.
-
@RaceProUK said in WTF go?:
@ben_lubar said in WTF go?:
Other packages can't access methods and fields that don't start with a capital letter.
That's one of the most ridiculously arbitrary
conventionsregulations I've ever seen.FTFY
-
@RaceProUK said in WTF go?:
That's one of the most ridiculously arbitrary conventions I've ever seen.
Yeah, should be the other way round. ;)
-
@RaceProUK said in WTF go?:
@ben_lubar said in WTF go?:
Other packages can't access methods and fields that don't start with a capital letter.
That's one of the most ridiculously arbitrary conventions I've ever seen.
Encountered this once in QtQuick. It basically allows you to use C++ classes in a simplified declarative language, and there's some magic to link the two automatically.
Now, by convention, you write C++ method names in
camelCase
while QML arePascalCase
.Now, this is just convention. Nothing in the docs indicates it's anything more than a convention.
Yeah, no. Apparently, part of the magic takes your
camelCased
C++ methods and automatically binds them to aPascalCased
QML method (buttuming this has something to do with how it's compiled). If you make your C++ methodsPascalCased
it just fails with unknown method errors. No other hints.The urge to garrote a language designer was significantly higher the day I discovered that.
-
@RaceProUK said in WTF go?:
That's one of the most ridiculously arbitrary conventions I've ever seen.
Yeah, should be the other way round. ;)
It should be arbitrarily ridiculous?
-
@RaceProUK said in WTF go?:
It should be arbitrarily ridiculous?
Not what I meant, but yes, that works too. ;)