Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There are actual features which make Lisp a bit more difficult to understand and a few are related to syntax: especially the code as data feature. Some elements of the language have different purposes: both as code and as data. Symbols can be data and they can be identifiers. Lists can be data and they can group elements of the programming language. Others have only one purpose. For example an array is always data.

Symbols and lists behave differently depending on the context:

Examples for Lisp snippets:

   (foo bar baz)  ; it could be a macro, function or special operator form

   (quote (foo bar baz))   ; here it is data

   (defun do-something (foo bar baz) (a b c))  ; here it is an arglist

   (defun do-something (a b c) (foo bar baz))  ; one element later it is a form
These context need to be learned and actual visual clues are a) the symbol in front and b) the structure of the expression.

This is puzzling for a lot of people. A few never really take that hurdle.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: