top | item 25934557

(no title)

tus88 | 5 years ago

> Nor do I find charming the belligerent lack of any magical syntactic sugar for `self`. Does Python force you to pass it as an argument to make some kind of clever point? Are there psychotic devs out there who call it something other than `self`? Yuck!

If you weren't an ignoramous you would understand it can be something else, like klass.

discuss

order

gorgoiler|5 years ago

You spelled it wrong!

Ruby’s approach is the most delightful, I find. elf is an instance of Elf and in elf.health, self is the elf.

Elf is an instance of Class and in Elf.surpass, self is the Elf class itself.

rbanffy|5 years ago

Ruby's irregular syntax drives me crazy. But it is beautiful.

staticautomatic|5 years ago

I gotta say as a Python developer I kinda like this compared to thing = Thing()