Comments (3)
In R7RS Section 4.2.3 there seems to be two distinct forms of (begin)
: body/top-level and expression. Your first example is of the top-level form because it appears in a top-level context and its result is unused. The second example is an expression form because it's being used as an expression for initialising s
I think you're completely correct that we're not handling the body form correctly and that's a bug. However, I think the expression form should introduce a new scope based on the example (begin)
macro in Section 7.3:
(define-syntax begin
(syntax-rules ()
((begin exp ...)
((lambda () exp ...)))))
This will clearly create a new scope due to the enclosing (lambda)
.
Does this make sense? I'll look at fixing the top-level form if you don't have any objections.
from llambda.
Maybe you misread something? In second example, begin
wrap an internal definition, its result is unused, so I think this usage of begin
still belongs to body/top-level
form.
from llambda.
Sorry you're right. I thought the second example was a variable delcaration because I missed the lambda shorthand form
from llambda.
Related Issues (20)
- Fix debug information on LLVM 3.5 HOT 1
- Allow custom error messages for (cast) and (ann)
- Include file and line information in runtime errors
- Support (case-lambda) tail recursion
- Support (plambda)
- Categorize runtime exceptions
- Implement value cloning HOT 1
- Fix intersection of indeterminate types
- Support running programs immediately after compilation
- Fix build on old LLVM HOT 1
- Generate Constant Records
- Create Dockerfile
- Create Homebrew Formula
- Check for overflow when truncating integers
- Support (member), (assoc) with comparison procedure
- Unable to run with latest master HOT 6
- Self-hosting
- Cannot run test program with current master HOT 5
- Compile error
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 llambda.