The at sign (@)

In a number of examples involving GTK (perhaps especially using GtkReactive) the code shows things like @Window or @Frame. Is the @ required or just used by the programmer to make some kind of differentiation?

1 Like

It denotes a macro call. This is explained in the manual here:

https://docs.julialang.org/en/v1/manual/metaprogramming/#man-macros

1 Like

Identifyers starting with @ are, as already mentioned, macro calls. Macros are somewhat complicated, a simple explanation would be to say tey are constructs that are (typically) prepended to some code snippet, and then perform some transformations on that code before it is run (they replace your code with something different). To know what kind of code you can supply to a specific macro and what it will do you have to read its documentation carefully ( for example, in a repl, type julia>?@time to read the documentation for the @time-macro).
If you want to know exactly what a macro does to your code, try out the @macroexpand macro.

2 Likes

Thanks to you both. I’ll study this.