PLDB
Languages Features Creators Calendar CSV Resources Blog About Donate Add Language
GitHub icon

Classes

< >
class Person {}
Example from Python, Cython:
class Person (object): def __init__(self, name): self.name = name
Example from 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

Languages with Classes include Java, JavaScript, Python, C++, PHP, C#, Ruby, Scala, Swift, Kotlin, PowerShell, Haskell, TypeScript, Dart, Reason, Crystal, CoffeeScript, F#, OCaml, Groovy, Chapel, ABAP, X10, Clean, SystemVerilog, Cython, Angelscript, Pizza, Apex, JS++, Deesel, Real-Time Concurrent C, Static Typescript

Languages without Classes include C, Objective-C, C3, progsbase, C2, Tick C, cooC

Read more about Classes on the web: 1.

HTML of this page generated by Features.ts

hasCharacters.html 路 hasClasses.html 路 hasClobs.html

View source

PLDB - Build the next great programming language Search v2023 Day 157 Docs Acknowledgements Traffic Today Traffic Trends Mirrors GitHub feedback@pldb.com