Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What languages other than Python have an explicit self?

It seems a bit weird that Python requires you to explicitly pass self as the first argument to all class functions. Are there other languages that require something similar?

like image 573
agiliq Avatar asked Dec 01 '22 11:12

agiliq


1 Answers

By explicit, do you mean "explicitly passed as an argument to each class function"? If so, then Python is the only one I know off-hand.

Most OO languages support this or self in some form, but most of them let you define class functions without always defining self as the first argument.

like image 50
linked Avatar answered Dec 05 '22 04:12

linked