Access Modifiers
================
```Example from 1 languages: TypeScript
class Person {
private _age = 2
public get age() {
return _age
}
protected year = 1990
}
```
```Example from 1 languages: MoonBit
pub struct R2 { // 显式的公共结构
x: Int // 隐式的公共字段
pub y: Int // WARNING: `pub` 是多余的!
priv z: Int // 显式的私有字段
}
```
```Example from 1 languages: Jule
pub
```
```Example from 1 languages: 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!
```
*
Languages *with* Access Modifiers include Java, C++, PHP, TypeScript, C#, Swift, Kotlin, Solidity, F#, Protocol Buffers, C3, ABAP, Koka, MoonBit, C2, Jule, Apex, Sophia, Speedie
*
Languages *without* Access Modifiers include JavaScript, C, progsbase
*
View all concepts with or missing a *hasAccessModifiers* measurement
http://pldb.info/../lists/explorer.html#columns=rank~id~appeared~tags~creators~hasAccessModifiers&searchBuilder=%7B%22criteria%22%3A%5B%7B%22condition%22%3A%22null%22%2C%22data%22%3A%22hasAccessModifiers%22%2C%22origData%22%3A%22hasAccessModifiers%22%2C%22type%22%3A%22num%22%2C%22value%22%3A%5B%5D%7D%5D%2C%22logic%22%3A%22AND%22%7D missing
http://pldb.info/../lists/explorer.html#columns=rank~id~appeared~tags~creators~hasAccessModifiers&searchBuilder=%7B%22criteria%22%3A%5B%7B%22condition%22%3A%22!null%22%2C%22data%22%3A%22hasAccessModifiers%22%2C%22origData%22%3A%22hasAccessModifiers%22%2C%22type%22%3A%22num%22%2C%22value%22%3A%5B%5D%7D%5D%2C%22logic%22%3A%22AND%22%7D with
*
Read more about Access Modifiers on the web: 1.
https://en.wikipedia.org/wiki/Access_modifiers 1.
Built with Scroll v178.2.3