7 points · by bakery2k · 10y ago · 8 comments
Some examples:
- C++: Zero-cost abstractions
- Lua: Ease of embedding
- Rust: Memory safety without garbage collection
Other possibilities:
- Go: CSP-style concurrency?
- Julia: Multiple dispatch?
- Python: Executable pseudocode (or, in its early years, "Perl, but readable")?
Of course, it's also got plenty of drawbacks, but you didn't ask about those. :-)
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) {};