Hi,

  > I don't understand the `[] and `-> syntax. I need some simple
  > examples of usage. Also a ->ident aka a["ident"] escapes me. What
  > is meant by "Ident" i.e. "Identifier"?

The backtick versions, `[] and `->, are the names of the operations as
functions. For example, you could do:

  `[](obj, ind)

and it would be equivalent obj[ind]. This may seem kind of useless
when used directly like this, but if can be useful when you need to
pass the function as an argument to another function, or if you want
to overload the indexing operations in a class; then you need some way
of referring to the indexing functions themselves without immediately
using them the way you would with obj[ind].




/ Leif

  • Found Good... Duke Normandin
    • Re: F... Duke Normandin
    • Found... Leif Stensson, Lysator @ Pike importm�te f�r mailinglistan
    • Re: F... Duke Normandin

Reply via email to