Re: why is there no setf in picolisp?

2019-07-04 Thread Bruno Franco
all right, thanks!

On Thu, Jun 27, 2019 at 12:27 PM  wrote:

> So, reading Alex’s comments and also the definition of the “joke” `setf`
> here:
>
> On Thu, 27 Jun 2019 10:29 -04:00, Mike wrote:
>
> https://github.com/picolisp/picolisp/blob/dev/misc/setf.l
>
>
> informs me that the answer to Bruno’s question is: yes, the concept in
> fact *does* exist in picolisp (by the use of its `set` primitive),
> rendering such as a `setf` entirely unnecessary (and un-idiomatic as well).
>


Re: why is there no setf in picolisp?

2019-06-27 Thread rick
So, reading Alex’s comments and also the definition of the “joke” `setf` here:

On Thu, 27 Jun 2019 10:29 -04:00, Mike wrote:
> https://github.com/picolisp/picolisp/blob/dev/misc/setf.l

informs me that the answer to Bruno’s question is: yes, the concept in fact 
*does* exist in picolisp (by the use of its `set` primitive), rendering such as 
a `setf` entirely unnecessary (and un-idiomatic as well). 

Re: why is there no setf in picolisp?

2019-06-27 Thread Mike
https://github.com/picolisp/picolisp/blob/dev/misc/setf.l


June 27, 2019 8:06 AM, "Bruno Franco"  wrote:

> Soo, yeah. I'm studying common lisp, and coming from picolisp setf confused 
> me at first. The
> concept does not seem to appear on picolisp, and I wondered why its not there.
> 
> The only reference I could find was this:
> https://www.mail-archive.com/picolisp@software-lab.de/msg03604.html
> 
> it mentions that it "violates the spirit of how lisp functions evaluate their 
> arguments", but no
> more comment is made.
> 
> I hope I'm forgiven if a flame war starts, but I'm trying to understand what 
> makes a good lisp.
> 
> So, why is there no setf in picolisp?

--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: why is there no setf in picolisp?

2019-06-27 Thread Danilo Kordic
  [setf (+ (** c 2) (+ (* -5 c) 6)) 0] ?!


On Thu, Jun 27, 2019, 07:39 Alexander Burger  wrote:

> Hi Bruno,
>
> > So, why is there no setf in picolisp?
>
> The answer is simple: It does not make sense.
>
> PicoLisp is a pure interpreter, and what 'setf' does is setting the value
> of
> what the expression *would* return. I'm not fit in CommonLisp, but
>
>(setf (car X) 7)
>
> means to set the CAR of the cell pointed at by X to 7.
>
> So a compiler analyzes the argument (car X), and compiles
>
>(set X 7)  # in PicoLisp
>
> Similarly,
>
>(setf (get 'X 'a) 7)
>
> compiles to
>
>(put 'X 'a 7)
>
>
> There is a 'setf' function in PicoLisp (meant as a joke) in
>
>misc/setf.l
>
> ☺/ A!ex
>
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


Re: why is there no setf in picolisp?

2019-06-26 Thread Alexander Burger
Hi Bruno,

> So, why is there no setf in picolisp?

The answer is simple: It does not make sense.

PicoLisp is a pure interpreter, and what 'setf' does is setting the value of
what the expression *would* return. I'm not fit in CommonLisp, but

   (setf (car X) 7)

means to set the CAR of the cell pointed at by X to 7.

So a compiler analyzes the argument (car X), and compiles

   (set X 7)  # in PicoLisp

Similarly,

   (setf (get 'X 'a) 7)

compiles to

   (put 'X 'a 7)


There is a 'setf' function in PicoLisp (meant as a joke) in

   misc/setf.l

☺/ A!ex

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: why is there no setf in picolisp?

2019-06-26 Thread Alexander Burger
On Thu, Jun 27, 2019 at 05:11:45AM +, SuperSaiyanBlue wrote:
> What does setf do that set or setq can't do?

Nothing I think. It is just syntactic sugar :)

☺/ A!ex

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: why is there no setf in picolisp?

2019-06-26 Thread SuperSaiyanBlue
What does setf do that set or setq can't do?

On June 27, 2019 4:51:13 AM UTC, Bruno Franco  
wrote:
>Soo, yeah. I'm studying common lisp, and coming from picolisp setf
>confused
>me at first. The concept does not seem to appear on picolisp, and I
>wondered why its not there.
>
>The only reference I could find was this:
>https://www.mail-archive.com/picolisp@software-lab.de/msg03604.html
>it mentions that it "violates the spirit of how lisp functions evaluate
>their arguments", but no more comment is made.
>
>I hope I'm forgiven if a flame war starts, but I'm trying to understand
>what makes a good lisp.
>
>So, why is there no setf in picolisp?

-- 
SuperSaiyan Blue
Sent via email ;)

why is there no setf in picolisp?

2019-06-26 Thread Bruno Franco
Soo, yeah. I'm studying common lisp, and coming from picolisp setf confused
me at first. The concept does not seem to appear on picolisp, and I
wondered why its not there.

The only reference I could find was this:
https://www.mail-archive.com/picolisp@software-lab.de/msg03604.html
it mentions that it "violates the spirit of how lisp functions evaluate
their arguments", but no more comment is made.

I hope I'm forgiven if a flame war starts, but I'm trying to understand
what makes a good lisp.

So, why is there no setf in picolisp?