StardustPL / Stardust

"A programming language that doesn't make me angry to use it."
https://StardustPL.GitHub.IO/
The Unlicense
4 stars 0 forks source link

Planning: class vs struct vs namespace #29

Open LB-- opened 8 years ago

LB-- commented 8 years ago

Structures and classes are identical except:

LB-- commented 8 years ago

Namespaces are like structures, except they use the factory pattern for construction. This is how dynamic module loading is accomplished: just instantiate the namespace you want.

LB-- commented 8 years ago

Namespaces are immutable, meaning types and classes (etc.) cannot change after the namespace is constructed.