$
does exact and partial match, myList$name
is equivalent to
`$`(myList, name)
As @Frank pointed out, the second argument name
won't be evaluated, but be treated as a literal character string. Try ?`$`
and see the document.
In your example. myList$name
will try to look for name
element in myList
That is why you need myList[[name]]