Questions Concepts
GitHub icon

Access Modifiers

Access Modifiers - language feature

< >
class Person { private _age = 2 public get age() { return _age } protected year = 1990 }
Example from Speedie:
class Person |int| age setter age expect (value >= 0) ("bad age $value set!") .age = value main || p = person() p.age = -1 // calls a function rather than the property || n = p.age // reads the property directly!
Example from Jule:

Languages with Access Modifiers include Java, C++, PHP, C#, Swift, Kotlin, TypeScript, Solidity, F#, ABAP, Protocol Buffers, C3, Speedie, Koka, Jule, Pizza, Apex, C2, Sophia, Oracle Java, Deesel, Real-Time Concurrent C, Static Typescript

Languages without Access Modifiers include JavaScript, C, Objective-C, progsbase, Tick C

This question asks: Does this language have access modifiers?

Read more about Access Modifiers on the web: 1.

HTML of this page generated by Features.ts

View source

- Build the next great programming language Search Add Language Features Creators Resources About Blog Acknowledgements Queries Stats Sponsor Traffic Traffic Today Day 305 Logout