6
votes
Accepted
Best Practice - Where to declare variables in Common Lisp?
Your approach is correct: we bind (rather than declare, as in other languages) variables exactly where we need them. (In your case, however, you are using h-offset in the 1st half of your function, ...
6
votes
Types in Lisp and Scheme
Typed Racket is very different from Haskell. Type systems in Lisp and Scheme, and indeed type systems in traditionally untyped language ecosystems in general, have a fundamental goal that other type ...
5
votes
SBCL development on Windows, including CFFI
This is a little late, but as of about 2 months ago (05/2018) I found this project called Portacle which bundles SBCL, Emacs, Quicklisp, and more into a single package for Windows 10. All you have to ...
5
votes
Accepted
In which order should lisp functions be defined?
For Common Lisp I'm using something like this:
files are organized in systems and subsystems (see for example ASDF as a tool for that)
you can put everything in one file, but that takes some care
...
3
votes
Accepted
Are multiple dynamic dispatch methods possible?
It's always possible
There are lots of work-arounds to implement multi-methods in languages that don't support them:
Some use dispatch tables. The most impressing is imho in Alexandrescu's Modern C++...
3
votes
Are multiple dynamic dispatch methods possible?
This is basically a fundamentally impossible problem:
The fundamental idea of multiple dispatch is that all arguments that take part in the dispatch are equal, i.e. that there is no argument which is &...
3
votes
Simple tic-tac-toe GUI in Common Lisp: Avoid using Continuation Passing Style?
I've written quite a bit of code like what you post and now that I'm older (wiser is debatable, I'm sure) I've realized that there was one key tension in designs like this.
On the one hand you have ...
3
votes
In which order should lisp functions be defined?
Common Lisp has both COMPILE and COMPILE-FILE.
An implementation like SBCL does not warn about undefined function if you compile the whole file, for example. Under slime, C-c M-k does not trigger a ...
2
votes
Accepted
Use `labels` or nested `flet`?
Generally Lisp is less dogmatic about programming style. Some programming style might not be desirable in hand-written code, but might be useful for generated code. Since generated code (-> macros) is ...
2
votes
Lisp: circular structure printing through user-defined print methods: what are the requirements?
The answer is: yes, but the printer is not required to sweep the whole image, only the objects provided to printing functions.
Nothing forbids the Lisp printer from performing multiple passes or any ...
1
vote
Scheme's define in Common Lisp
You don't have to use LET when using DEFUN: you can define local variables in the parameter list:
(defun foo (a)
(let ((b (expt a 3)))
(+ a b)))
is also
(defun foo (a &aux (b (expt a 3)))
...
1
vote
Should I introduce a data format with limited expressivity or use the full expressiveness of lisp?
There are companies (e.g. Franz Inc.) that successfully sell both Common Lisp (e.g. Allegro Common Lisp) and a graph database (e.g. AllegroGraph). There is cl-neo4j, an interface to the neo4j graph ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
common-lisp × 27lisp × 15
scheme × 5
haskell × 3
type-systems × 3
programming-languages × 2
design × 1
design-patterns × 1
object-oriented × 1
programming-practices × 1
licensing × 1
coding-style × 1
data-structures × 1
terminology × 1
functional-programming × 1
tdd × 1
gpl × 1
clean-code × 1
concurrency × 1
windows × 1
deployment × 1
functions × 1
gui × 1
self-improvement × 1
encapsulation × 1