Comments (10)
in my experience, a reasonably self-restrained use of anaphoric macros makes the code more readable.
from chrysalisp.
I also learnt from looking at (aand) that I need to fix the (and) and (or) macros in ChrysaLisp to work with 0 paramaters ! So thanks for that.
from chrysalisp.
I'd have to understand what it was first ;)
from chrysalisp.
See https://en.wikipedia.org/wiki/Anaphoric_macro :)
from chrysalisp.
And also:
http://common-lisp.net/project/anaphora/
from chrysalisp.
As well as here: https://common-lisp.net/project/anaphora/anaphora.html
from chrysalisp.
OK, yes I can see the benefit to having some of these macros around. But I also have some reservations, in part due to how ChrysaLisp does things, and in part due to my own personal bias.
I clearly already have source where I regularly need to keep the result of the test (or part of it) around for later use if the test turns out to be true, and I find myself doing things like:
(if (defq it (...))
(do-somthing-that-needs-it ...))
Most often in (cond) statements. And yes it's a bit of a pain, so would be nice to have a generic way of doing this.
However, I have never used (let), despite it being in the boot.inc file ! (boo, hiss, from the scope purists..) and tend to use (defq it) so as not to push another scope, and suffer the penalty of slowing access to variables by another scope (we are talking small overhead here, but there is some).
In the (acond) case you are also making every clause take the extra hit for a (let) even if only one or a few clauses make use of the convenient 'it' within that clause ?
So I feel a little conflicted on the use of these things. But don't object to them either as they are rather convenient.
As they are something a user can decide to use or not, with I would hope understanding the consequences of using them, I think it would be worth providing some of them.
from chrysalisp.
So I feel a little conflicted on the use of these things.
I feel the same way, and it seems that @tokenrove, @nikodemus, @attila-lendvai, @Ferada, @brianqq, @noctuid et al. (Couldn't find everyone's Github handle — sorry :)) also feel that way:
https://common-lisp.net/project/anaphora/anaphora.html
Extensive use of anaphoric macros is not good style, and probably makes you go blind as well — there's a reason why Anaphora claims to be from Hell.
Hence the question mark in the issue title. :)
I also learnt from looking at (aand) that I need to fix the (and) and (or) macros in ChrysaLisp to work with 0 paramaters ! So thanks for that.
Glad to hear that!
from chrysalisp.
Oh btw. — you might like this book by Paul Graham, made available by @daviddrysdale:
http://www.lurklurk.org/onlisp/onlisp.html
from chrysalisp.
I moved the anaphoric file over to class/lisp/anaphoric.inc. If folks want to include them and use them or add more of them, that's where they live.
Thanks.
from chrysalisp.
Related Issues (20)
- Transition Log Service to new IPC and data exchangers HOT 1
- Fix yaml string quote compounding
- Display scaling options? HOT 5
- src/main.cpp:37:11: fatal error: 'SDL.h' file not found HOT 5
- Package manager needed HOT 3
- @Chris HOT 16
- Containers woven in to foundations HOT 1
- Interprocess communication port needed HOT 4
- WYSIWYG interface builder HOT 6
- A browser for ChrysaLisp pages. HOT 10
- WebDriver compatible functional UI clicking test automation HOT 1
- reload definitions in lisp HOT 3
- error while compiling HOT 3
- error HOT 1
- rather a request: RISCV would be great HOT 10
- SDL2 dep for building on Macs - tweaks needed? HOT 9
- Bootstrapping ChrysaLisp on ChrysaLisp? HOT 10
- README feedback HOT 5
- Transparent windows HOT 1
- Can it run Doom? HOT 1
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 chrysalisp.