Re: [9fans] ot: pascal rides again?

2015-05-25 Thread Bakul Shah
On Sun, 24 May 2015 17:25:54 EDT minux wrote: > > On Sun, May 24, 2015 at 11:55 AM, erik quanstrom > wrote: > > > > Uhm I might be mistaken, but I guess [8192]byte is an array, and []byte > > are > > > slices - therefore they are different types. > > > > > > > yes, exactly. i suppose this impl

Re: [9fans] ot: pascal rides again?

2015-05-24 Thread lucio
> (i.e. you don't need ~65 pages of style guide just to tell you how to > write acceptable code.) I think it's wasteful to defend Go. Let history do that... Lucio.

Re: [9fans] ot: pascal rides again?

2015-05-24 Thread C Cirello
2015-05-24 23:25 GMT+02:00 minux : > > Regarding the boring comment, I agree to some extent. There isn't > many fancy features that other languages have, but that's exactly the > advantage of Go, and it's the price to pay when you want readability. > (i.e. you don't need ~65 pages of style guide ju

Re: [9fans] ot: pascal rides again?

2015-05-24 Thread minux
On Sun, May 24, 2015 at 11:55 AM, erik quanstrom wrote: > > Uhm I might be mistaken, but I guess [8192]byte is an array, and []byte > are > > slices - therefore they are different types. > > > > yes, exactly. i suppose this implies that different size arrays are not > type compatable > (yea pasc

Re: [9fans] ot: pascal rides again?

2015-05-24 Thread Ryan Gonzalez
On May 24, 2015 2:00:05 PM CDT, Bakul Shah wrote: > > >On May 24, 2015, at 8:55 AM, erik quanstrom >wrote: > >>> Uhm I might be mistaken, but I guess [8192]byte is an array, and >[]byte are >>> slices - therefore they are different types. >> >> yes, exactly. i suppose this implies that differ

Re: [9fans] ot: pascal rides again?

2015-05-24 Thread Bakul Shah
On May 24, 2015, at 8:55 AM, erik quanstrom wrote: >> Uhm I might be mistaken, but I guess [8192]byte is an array, and []byte are >> slices - therefore they are different types. > > yes, exactly. i suppose this implies that different size arrays are not type > compatable > (yea pascal). als

Re: [9fans] ot: pascal rides again?

2015-05-24 Thread Ryan Gonzalez
Go array =~ C++ std::array Go slice =~ C++ std::vector& On May 24, 2015 12:02:54 PM CDT, "Aram Hăvărneanu" wrote: >On Sun, May 24, 2015 at 5:55 PM, erik quanstrom >wrote: >> and implies dynamic allocation of the slice, i'm guessing. > >Don't guess. Please read the links I provided, they explain

Re: [9fans] ot: pascal rides again?

2015-05-24 Thread Ryan Gonzalez
It's actually a reference to the original array, I believe. On May 24, 2015 10:55:31 AM CDT, erik quanstrom wrote: >> Uhm I might be mistaken, but I guess [8192]byte is an array, and >[]byte are >> slices - therefore they are different types. >> > >yes, exactly. i suppose this implies that diff

Re: [9fans] ot: pascal rides again?

2015-05-24 Thread Aram Hăvărneanu
On Sun, May 24, 2015 at 5:55 PM, erik quanstrom wrote: > and implies dynamic allocation of the slice, i'm guessing. Don't guess. Please read the links I provided, they explain all this. Arrays in Go are not like arrays in C and Pascal, slices are more close. Go arrays are values, so copying one i

Re: [9fans] ot: pascal rides again?

2015-05-24 Thread Devon H. O'Dell
http://blog.golang.org/go-slices-usage-and-internals 2015-05-24 8:55 GMT-07:00 erik quanstrom : >> Uhm I might be mistaken, but I guess [8192]byte is an array, and []byte are >> slices - therefore they are different types. >> > > yes, exactly. i suppose this implies that different size arrays are

Re: [9fans] ot: pascal rides again?

2015-05-24 Thread erik quanstrom
> Uhm I might be mistaken, but I guess [8192]byte is an array, and []byte are > slices - therefore they are different types. > yes, exactly. i suppose this implies that different size arrays are not type compatable (yea pascal). also the fu := bar[:] looks a lot like the tedious casting from

Re: [9fans] ot: pascal rides again?

2015-05-23 Thread Ryan Gonzalez
I read the Go docs *once*, but I'm pretty sure you're right. I think to make a slice out of an array, you'd do something like the_array[:]. All to say why I don't like Go. :) On May 23, 2015 1:14:55 PM CDT, C Cirello wrote: >Uhm I might be mistaken, but I guess [8192]byte is an array, and []byt

Re: [9fans] ot: pascal rides again?

2015-05-23 Thread C Cirello
Uhm I might be mistaken, but I guess [8192]byte is an array, and []byte are slices - therefore they are different types. - CC 2015-05-23 17:53 GMT+02:00 erik quanstrom : > well, at least dennis wrote "why pascal is not my favorite programming > language". > > from go build > > ./

Re: [9fans] ot: pascal rides again?

2015-05-23 Thread Aram Hăvărneanu
http://blog.golang.org/slices http://blog.golang.org/go-slices-usage-and-internals -- Aram Hăvărneanu

Re: [9fans] ot: pascal rides again?

2015-05-23 Thread Eduardo Alvarez
I thought the author was Brian Kernighan? On Sat, May 23, 2015 at 12:53 PM, erik quanstrom wrote: > well, at least dennis wrote "why pascal is not my favorite programming > language". > > from go build > > ./cat.go:36: cannot use data (type [8

[9fans] ot: pascal rides again?

2015-05-23 Thread erik quanstrom
well, at least dennis wrote "why pascal is not my favorite programming language". from go build ./cat.go:36: cannot use data (type [8192]byte) as type []byte in argument to cat what? perhaps i'm missing something about the language, but it sure seems ironic. - erik