Comments (6)
There may be a linter for Common Lisp but there is not one 'standard' one like there are for other languages. Implementations of Common Lisp often produce their own warnings and messages as the source code is read and evaluated. For example SBCL (the implementation I primarily use) is known for its good style and compilation messages.
from common-lisp.
Kind of random question--have you heard of lisp critic? Someone I know is pretty excited about it.
from common-lisp.
This "Lisp Critic" http://cs.northwestern.edu/academics/courses/325/exercises/critic.php ?
Pluses: it's by Chris Riesbeck whose Lisp-Unit tests we already use and whose class syllabus we recommend in our documentation, which is full of great stuff.
Minuses: None immediately evident.
We'll have to try it out. A quick scan of it's source code http://cs.northwestern.edu/academics/courses/325/programs/cs325/lisp-critic.lisp suggests there are a few known limitations, so it might be that SBCL's style warnings are sufficient or perhaps even better, while it might still be useful for someone using another implementation. We could perhaps add links to any or all of these resources
- Peter Norvig and Kent Pitman's Tutorial on Good Lisp Programming Style: http://norvig.com/luv-slides.ps PDF here: http://www.cs.umd.edu/~nau/cmsc421/norvig-lisp-style.pdf
- Google's CL style guide: http://google-styleguide.googlecode.com/svn/trunk/lispguide.xml
- Chris Riesbeck's style guide (likely the origin of lisp critic): http://cs.northwestern.edu/academics/courses/325/readings/lisp-style.php but also:
- Riesbeck on Naming: http://cs.northwestern.edu/academics/courses/325/readings/names.php
- Riesbeck's Cardinal Rule of Functions: http://cs.northwestern.edu/academics/courses/325/readings/cardinal-rule.php
- Riesbeck's notes on things one should not imitate about Paul's Graham's code in ANSI Common Lisp (otherwise used as the text book) http://cs.northwestern.edu/academics/courses/325/readings/graham/graham-notes.php
Not quite on style but emergently useful working with this topic:
- Peter Norvig's retrospective on his classic Paradigms of AI Programming, especially the section on "What Lessons are in PAIP?" http://www.norvig.com/Lisp-retro.html
- Peter Norvig's Design Patterns in Dynamic Programming http://norvig.com/design-patterns/design-patterns.pdf
- Jeff Dalton's Common Lisp Pitfalls: http://www.aiai.ed.ac.uk/~jeff/lisp/cl-pitfalls
from common-lisp.
Yeah, the Chris Riesbeck one.
I just followed some of your links. I love this:
Bad names reduce code maintainability. Names are bad when they are:
- cryptic, e.g., bltx
- hopelessly vague, e.g., data
- overly verbose, e.g., first-item-to-delete
- misleading, e.g., num for something that holds a list of numbers
Good names are:
- short
- plain English or follow common convention
- accurate
Anyway, yeah, I think that it could be useful to link to these things.
from common-lisp.
@wobh These look like good resources. Lisp Critic seems to be a function which you pass a symbol bound to a function. If we wanted to we could probably build that in to the test files - but only for the exported functions. Now that I type that I doubt that it would be useful (unless it descends to functions called by the function provided).
@kytrinyx your formatting caused the "good" items to flow in with the "bad" items - scanning it this morning before coffee I was very confused by 'short' & 'accurate' where signs of bad names! :)
I've been "away" from this track for a while but am trying to come back; these links could go in the SETUP.md file that all the tracks are going to have.
from common-lisp.
d'oh! Fixed :)
from common-lisp.
Related Issues (20)
- Out of sync practice exercises HOT 1
- Out of sync practice exercises HOT 1
- Using `roswell` to run tests. HOT 10
- Building a training set of tags for common-lisp HOT 20
- Typo in robot-simulator test. HOT 2
- Deprecate `beer-song` in favor of `bottle-song` HOT 3
- Out of sync practice exercises
- Out of sync practice exercises
- Implement `leap`? HOT 5
- Out of sync practice exercises HOT 1
- Out of sync practice exercises
- key-comparison maze of arrays unclear test of identity or internal structure HOT 3
- Out of sync practice exercises
- Out of sync practice exercises
- Out of sync practice exercises HOT 1
- Out of sync practice exercises HOT 1
- Out of sync practice exercises
- Confusing hint in Larry's Winning Checker
- Concept reducing typo element rather than sequence HOT 2
- Out of sync practice exercises
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from common-lisp.