News for hackers. Stuff that matters.
Re:Hello (Distributed) World: Designing Software that Spread... by cracki on Friday August 13, 2010 @05:06AM (#1600448)
in scheme, the ' is the syntax for a quote. i'm guessing they use it here as syntax to symbols, but in some of the example code, i see it in front of list-like things too...
Re:Hello (Distributed) World: Designing Software that Spread... by adamb on Friday August 13, 2010 @11:09AM (#1601109)
Our use of ' was inspired by lisp's.

Immutability such is an important part of Spin's messaging model that we wanted a consistent way to declare an immutable construction.

  # An immutable string (or symbol)
  'foo

  # An immutable list
  '[ 1, 'foo, '[] ]

  # An immutable map
  '{ foo: 1, y: 'two, z: '[ 'three ] }

Slightly more advanced...

  # Also an immutable string
  "foo with spaces" 

  # An immutable pair
  "bar" -> 2

  # Syntactic sugar for that same pair
  bar: 2 

  # Syntactic sugar for "baz" -> baz
  ~baz
Re:Hello (Distributed) World: Designing Software that Spread... by adamb on Friday August 13, 2010 @11:21AM (#1601137)
While we're talking about syntax, "\n" is an alternative to ",".

This helps multi-line expressions read more naturally.

  '{
    foo: 1
    baz: 'bar
    chunky: 'bacon
  }