1 / 116
文档名称:

Good Lisp Programming Style.pdf

格式:pdf   页数:116
下载后只包含 1 个 PDF 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

Good Lisp Programming Style.pdf

上传人:bolee65 2014/3/7 文件大小:0 KB

下载得到文件列表

Good Lisp Programming Style.pdf

文档介绍

文档介绍:Lisp Users and V endo rs Conference
August
T uto rial on
Go o d Lisp Programming
St yle
P eter No rvig
Sun Microsystems Labs Inc
Kent Pitman
Ha rlequin
Inc
c
P o rtions cop yright
P eter No rvig
c
P o rtions cop yright
Kent M
Pitman
All Rights Reserved

Outline

What is Go o d St yle

Tips on Built
In F unctionalit y

Tips on Nea r
Standa rd T ools

Kinds of Abstraction

Programming in the La rge

Miscellaneous

What is Go o d St yle
Good Lisp Programming St yle
Elegance is not optional
Richa rd A
O
Keefe
Good st yle
in any language
leads to p rograms that
a re

Understandable

Reusable

Extensible

E
cient

Easy to develop
debug
It also helps co rrectness
robustness
compatibil i t y
Our maxims of go o d st yle a re

Be explicit

Be sp eci
c

Be concise

Be consistent

Be helpful
anticipate the reader
s needs

Be conventional
don
t b e obscure

Build abstractions at a usable level

Allo w to ols to interact
referential transpa rency
Good st yle is the
underw a re
that supp o rtsap rogram

Where do es go o d st e from
What T o Believe
Don
t b elieve everything w e tell y ou
Just most
W o rry less ab out what to b elieve and mo re ab out why
Kno w where y our
St yle Rules
come from

Religion
Go o d vs
Evil
This w a y is b etter

Philosophy
This is consistent with other things

Robustness
Liabilit y
Safet y
Ethics
I
ll put in
redundant checks to avoid something ho rrible

Legalit y
Our la wy ers sa ydoitthisw a y

P ersonalit y
Opinion
I lik e it this w a y

Compatibilit y
Another to ol exp ects this w a y

P o rtabilit y
pilers p refer this w a y

Co op eration
Convention
It has to be done
some unifo rm w a y
sow e agreed on this one

Habit
T radition
W e
ve alw a ys done it this w a y

Abilit y
My p rogram