@ for class names and $ within strings

Monkey Forums/Monkey Beginners/@ for class names and $ within strings

Danilo(Posted 2014) [#1]
What does an '@' mean in front of a class name?
Class @Object Extends Null="Object" ' found in modules/monkey/lang.monkey
End


What is '$' used for when declaring external functions/methods?
Function Print( message$ )="$print" ' what is the different between "print" and "$print"?
Method ToChars:Int[]()="$tochars"

What is the different between "print" and "$print" for the external name?


AdamRedwoods(Posted 2014) [#2]
for clarification: i think this is for Externs only.
the @ symbol stops other classes from extending it.

i don't know what the $ does. experiment a bit and let us know what it does.


Goodlookinguy(Posted 2014) [#3]
Aren't the $functionname bits special function names only for the compiler to handle.

Note: For future readers, an explanation of the 'Extends Null' part can be found here, go down to post 5 and below to find the answer.


Danilo(Posted 2014) [#4]
I'm writing a library, that's why I would like to know everything that could be useful.

'$' for external functions/methods seems to have to do with debugging.
For the above "Print" with external "$print" there are 2 external functions available: "print()" and "dbg_print()".

When I add '$' to my own external function declaration, Monkey X just crashes at compile time.
TRANS monkey compiler V1.64
Parsing...
Semanting...
Translating...
/Users/danilo/Projects/Monkey/theProject/theProject.monkey<126> : Internal error
Monkey Runtime Error : /Users/danilo/Projects/Monkey/theProject/theProject.monkey<126> : Internal error