Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Go

Name: Bernd 2013-04-14 12:25

What does /prog/ think about the go programming language?

Name: Anonymous 2013-04-14 13:02

NO EXCEPTIONS

Name: Anonymous 2013-04-14 13:25

>>2
I think that's something Go does right.

Name: Anonymous 2013-04-14 13:34

CG a shit.

Name: Anonymous 2013-04-14 14:12

>>2
>>3
What do they do instead of exceptions?

Name: Anonymous 2013-04-14 14:20

>>5
in Go, functions can return more than one variable. usually it's used like this:
result, err := funcName()
if err != nil {
fmt.Prinrln(err.Error())
}

you also have panic() and defer/recover, but you'd be better off going through the tour on the website

Name: Anonymous 2013-04-14 14:39

>>6
That's not a function at all! Functions cannot return more than one variable. That's a method, or maybe a subroutine.

Name: Anonymous 2013-04-14 14:43

>>7
the fuck is the difference between a method and a function other than the OO snobbery definition of a function

Name: Anonymous 2013-04-14 15:12

>>8
YHBT

Name: Anonymous 2013-04-14 15:15

>>9
FUCK YOU ILLOGICAL RACIST TRANSPHOBIC FURRYPHOBIC HOMOINTOLERANT MISOGYNIST SHOTGUNPHOBIC CRETIN I HATE YOU DIE IN A FIRE YAWEHYAWEHYAWHMAZELTOVTOVARICHOMTOVOYVEYSHALOM

Name: Anonymous 2013-04-14 15:16

>>10
I'm not afraid of shotguns!

Name: Anonymous 2013-04-14 15:22

>>8
A function is a direct mapping from one or more inputs to one value.
All functions return a value.

Name: Anonymous 2013-04-14 16:44

Repost

Name: Anonymous 2013-04-14 16:48

>>7,12
Think of it as a fucking tuple you sockcucker.

Name: Anonymous 2013-04-14 16:57

>>12
Functions need not return a value. Even in mathematics functions do not return a vaue when given an input outside its domain

Name: Anonymous 2013-04-14 17:03

>>1
back to le HN ``plz''

Name: Anonymous 2013-04-14 17:53

>cant algebraic types                                               `
LEEEEEEEEEEEEEEEEEEELL  XDXDDDDXDDDDDDDDDD
EGIN32 HIGH FIVES
XD XDXD XDDXDXD
I REPORT U

Name: Anonymous 2013-04-14 18:26

Name: Anonymous 2013-04-14 19:44

>>6
So it returns a tuple. And this is the part where we say that sum types would be so much better. And then someone says that Rob Pike, in his infinite wisdom, excluded them out of pragmatic compromise due to another design mistake in Go. And so on, recursively.

Name: Anonymous 2013-04-14 20:20

>>19
Rob KIKE

Name: Anonymous 2013-04-14 20:26

check 'em

Name: Anonymous 2013-04-14 20:31

>>21
nice dubs bro

Don't change these.
Name: Email:
Entire Thread Thread List