Jump to content

Singleton: Difference between revisions

(Tern Programming Language)
Line 1,140:
 
=={{header|Julia}}==
{{incorrect|Julia|ERROR: LoadError: syntax: extra token "IAmaSingleton" after end of expression}}
Julia allows singletons as type declarations without further specifiers. There can be only one instance of such a type, and if more than one variable is bound to such a type they are actually all bound to the same instance in memory:
<lang julia>
7,806

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.