News for hackers. Stuff that matters.
Re:Ask HN: What is the Unique Selling Point of each programm... by treehau5 on Monday July 11, 2016 @08:52AM (#12070660)
SQL: SELECT

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.