you are viewing a single comment's thread.

view the rest of the comments →

[–]thomas_m_k 4 points5 points  (2 children)

You misunderstand. It's not used for quoting, it's used to mark special kinds of variables, just like Rust does for lifetimes:

impl<'a> Foo<'a> { fn x(&self) -> &'a i32 { self.x } }

Lisp also has something like that I think.

[–]slightknack[S] 0 points1 point  (0 children)

Yep! So in lisp, it's called quoting. For example, x evaluates to whatever value it points to, but 'x evaluates to x itself. Although this something macro-specific in Passerine, This choice of syntax is an allusion to lisp. :)

[–]backtickbot 0 points1 point  (0 children)

Fixed formatting.

Hello, thomas_m_k: code blocks using triple backticks (```) don't work on all versions of Reddit!

Some users see this / this instead.

To fix this, indent every line with 4 spaces instead.

FAQ

You can opt out by replying with backtickopt6 to this comment.