Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Clojure is a general-purpose language supporting interactive development that encourages a functional programming style, and simplifies multithreaded programming.
22
votes
Accepted
Python decorators and Lisp macros
A decorator is basically just a function.
Example in Common Lisp:
(defun attributes (keywords function)
(loop for (key value) in keywords
do (setf (get function key) value))
function)
…
11
votes
Why does the Lisp community prefer to accumulate all the parentheses at the end of the funct...
The code is much more compact then. Movement in the editor is by s-expressions anyway, so you don't need that space for editing. Code is read mostly by structure and sentences - not by following delim …
10
votes
C# Dev - I've tried Lisps, but I don't get it
Even with static methods, I like to tie them to a "class" to categorize their context (Clojure seems to have this, CL doesn't seem to.)
Common Lisp does not attach namespaces to classes. … GUI development tools: WinForms and WPF (I know Clojure has access to the Java GUI libraries, but they're entirely foreign to me.) …
9
votes
In what programming language did "let" first appear?
The first Revised Scheme report AIM-452 from January 1978 has LET. Page 9.
note that Lisp used earlier a different construct PROG to introduce local variables.
(let ((a 1)
(b 1))
(+ a b))
…
4
votes
Byte code weaving vs Lisp macros
Lisp macros are operating at the source code level. If you wrap some macro around a piece of code, then you can do a lot of things. Including parsing the source code, inserting code, rewriting code, e …
3
votes
Are square brackets and curly braces in Clojure still S-expressions?
S-expressions are a textual representation for data. Numbers, symbols, cons cells, lists, strings, ... Common Lisp also has textual representations for arrays, vectors, more number types, characters, …