Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Ask HN: What is the Unique Selling Point of each programming language?.
Ruby: method_missing
JavaScript: function myFunction(){}; myFunction.isAn = 'object'
Go: The beautiful simplicity of implementing interfaces, and multiple return values (besides the concurrency primitives)
interface Thinger { DoThinger() }
type Thingy string;
func (t *Thingy) DoThinger() {
// Thingy, which was based of a string, now implements
Thinger. This can get really powerful.
func myFuncCanReturn() (thing1, thing2 Thinger) {};
There are no comments on this comment yet.
Ruby: method_missing
JavaScript: function myFunction(){}; myFunction.isAn = 'object'
Go: The beautiful simplicity of implementing interfaces, and multiple return values (besides the concurrency primitives)
interface Thinger { DoThinger() }
type Thingy string;
func (t *Thingy) DoThinger() {
// Thingy, which was based of a string, now implements
Thinger. This can get really powerful.
func myFuncCanReturn() (thing1, thing2 Thinger) {};