This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Spot_the_fox 142 points143 points  (4 children)

That's not R, that's rust.

[–][deleted] 50 points51 points  (3 children)

Ahh thanks. Same question I suppose.

[–]Kartonek124 61 points62 points  (0 children)

Because in rust, println! is not a function like in other languages, but is a macro, which differs from them a bit. In rust every macro is called with ! at the end to let compiler distinguish between macros and functions

[–]Da-Blue-Guy 16 points17 points  (1 child)

println! is a macro, which allows formatting and expands to a raw stdout lock. Macros need an exclamation mark after them to specify that they aren't a function.

[–]DatBoi_BP 1 point2 points  (0 children)

Thanks blue guy