Top 1K Features Creators Events Podcasts Books Extensions Interviews Blog Explorer CSV

Classes

< >
Example from 2 languages: JavaScript, TypeScript
class Person {}
Example from 1 languages: Python
class Person (object): def __init__(self, name): self.name = name
Example from 1 languages: Ruby
# A tiny Person class in Ruby: class Person attr_accessor :name, :age, : # getter and setter methods def initialize(name, age) @name = name @age = age end end # Create a new Person object: person = Person.new("John", 30) puts person.name puts person.age # Change the age of the person: person.age = 35 puts person.age
Example from 1 languages: Chapel
class
*

Languages with Classes include JavaScript, Python, Java, C++, PHP, Ruby, TypeScript, C#, PowerShell, Swift, Scala, Kotlin, Haskell, CoffeeScript, Dart, Crystal, Reason, Chapel, Groovy, F#, OCaml, ABAP, SystemVerilog, Clean, X10, Angelscript, Apex, Aardvark, JS++, Speedie, Simula 67

*

Languages without Classes include C, C3, Lil, C2, progsbase, SAKO

*

View all concepts with or missing a hasClasses measurement

*

Read more about Classes on the web: 1.

- Build the next great programming language Add Add Prompt Issues About Search Keywords Livestreams Labs Resources Acknowledgements