Re: "begin" has a variable name

[email protected]
Newsgroups gmane.lisp.scheme.bigloo
Organization Inria
Message-ID <2016510145722.5731dab2@arches>
Hi Pierre-François,

> Hello Manuel,
> 
> 
> I don't really know if this behavior is wanted or not:
> 
> If I define a function:
> 
> (define (test begin end)
>   (print begin end)
> )
> 
> It Both can be loaded and compiled.
> But at the execution I get:
> 
> *** ERROR:eval:
> Type "procedure" expected, "bint" provided -- 1
> 
> 1.  test, stdin@574
> 
> I can understand that the "begin" can be a protected keyword, but I feel strange that the compilation works ...
> 
> Hence if I declare:
> (define (test end)
>    (let ((begin 2))
>      (print begin end)
>      ))
> 
> It function works.
> So it seems that we can use begin has a variable name (but not always ^^ ...)
I guess the problem is coming from the non-hygienic macro expansion Bigloo
uses to implement many special forms. I agree that it might be difficult
for users to anticipate the problems but I don't think it would be possible
to modify Bigloo for solving this problem.

-- 
Manuel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.