lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


David Given wrote:

And personally, I think the syntax is appallingly ugly:

func (p *ByteSlice) Write(data []byte) (n int, err os.Error)

...defines a method on 'pointer to ByteSlice' (you can define methods on
pretty much any type, not just objects) with self called 'p', taking an
array of bytes called 'data' as parameter, returning a tuple of int and
os.Error.

I'm glad somebody else shares my esthetics :-)

Ralph