News for hackers. Stuff that matters.
Re:Interface Dispatch (2018) by microtherion on Thursday April 18, 2019 @09:02AM (#19690657)
"klass" is a common convention in OOP code when referring to classes, because "class" and "Class" are often reserved already.
Re:Interface Dispatch (2018) by mikepurvis on Thursday April 18, 2019 @10:53AM (#19691428)
Python typically goes with `cls`, particularly in conjunction with the `@classmethod` decorator.
Re:Interface Dispatch (2018) by qwsxyh on Thursday April 18, 2019 @12:59PM (#19692648)
Python code uses both.
Re:Interface Dispatch (2018) by mikepurvis on Thursday April 18, 2019 @09:41PM (#19696369)
Um, not really. PEP8 explicitly says to use `cls`:

https://www.python.org/dev/peps/pep-0008/#function-and-metho...

Re:Interface Dispatch (2018) by qwsxyh on Friday April 19, 2019 @08:55AM (#19699153)
Re:Interface Dispatch (2018) by chaosite on Thursday April 18, 2019 @09:53AM (#19690996)
Java seems to prefer `clazz`.
Re:Interface Dispatch (2018) by MaxBarraclough on Thursday April 25, 2019 @06:04PM (#19752924)
"klass" seems to somewhat outnumber "clazz" in OpenJDK, 1541 to 1021. Wonder if there's a reason they haven't settled on one.

https://github.com/openjdk/jdk/search?q=klass

https://github.com/openjdk/jdk/search?q=clazz

Re:Interface Dispatch (2018) by noblethrasher on Thursday April 18, 2019 @12:47PM (#19692528)
C# prefers `@class`