are always directly accessible through their names with the use of with-slots and slot-value, and the slot accessor options define specialized methods that use slot-value. CLOS itself has no notion of properties, although the MetaObject Protocol extension specifies means to access a slot's reader and writer function names, including the ones generated with the :accessor option. The following example shows a definition of a student class using these slot options and direct slot access: (defclass student () ((name :initarg :name :initform "" :accessor student-name) ; student-name is setf'able (birthdate :initarg :birthdate :initform 0 :reader student-birthdate) (number :initarg :number :initform 0 :reader student-number :writer set-student-number))) ;; Example of a calculated property getter (this is simply a method) (defmethod student-age ((self student)) (- (get-universal-time) (student-birthdate self))) ;; Example of direct slot access within a calculated property setter (defmethod (setf student-age) (new-age (self student)) (with-slots (birthdate) self (setf birthdate (- (get-universal-time) new-age)) new-age)) ;; The slot accessing options generate methods, thus allowing further method definitions (defmethod set-student-number :before (new-number (self student)) ;; You could also check if a student with the new-number already exists. (check-type new-number (integer 1 *))) D D supports a getter and setter function syntax. In version 2 of the language getter and setter class/struct methods should have the @property attribute. class Student { private char[] name_; // Getter @property char[] name() { return this.name_; } // Setter @property char[] name(char[] name_in) { return this.name_ = name_in; } } A Student instance can be used like this: auto student = new Student; student.name = "David"; // same effect as student.name("David") auto student_name = student.name; // same effect as student.name() Delphi This is a simple class in Delphi language which illustrates the concept of public property for accessing a private field. interface type TStudent = class strict private FName: string; procedure SetName(const Value: string); public /// <summary> /// Get or set the name of the student. /// </summary> property Name: string read FName write SetName; end; // ... implementation procedure TStudent.SetName(const Value: string); begin FName := Value; end; end. Java In this example of a simple class representing a student with only the name stored, one can see the variable name is private, i.e. only visible from the Student class, and the "setter" and "getter" are public, namely the "getName()" and "setName(name)" methods. public class Student { private String name; public String getName() { return name; } public void setName(String newName)