ZNOW

class

instance

interface

abstract-class

extends

implements

private

protected

public

static

const

constructor

super

read-only

friendly-method

event

Private/ Protected/ Public

ZNOW uses name prefix to determine whether a property is private, protected or public. If the property has no prefix, it would be classified as public. If the property begins with "$" or "_", it will be classified as protected or private.

The encapsulation rules in ZNOW is class-encapsulation, not object encapsulation. Objects created from same class can access each other's private properties. This behaviour is borrowed from Java and C, which programmers may find convenient.

var ClassA=Class({ foo1:function(){ //public method }, $foo2:function(){ //protected method }, _foo3:function(){ //private method }, a:false, //public attribute $b:false, //protected attribute _c:false, //private attribute });