On Jul 1, 2015, at 4:27 AM, Alexey Cherkaev wrote:
> Hi all,
>
> Thanks to all replies, at the moment I would tend to agree that generalised
> `set!` might not be such a great idea after all:
> The notion of 'place' is essentially a pointer to a memory location, but it
> is not the first-clas
Hi all,
Thanks to all replies, at the moment I would tend to agree that generalised
`set!` might not be such a great idea after all:
- The notion of 'place' is essentially a pointer to a memory location,
but it is not the first-class citizen: the following expressions are not
equivalent:
On Jun 30, 2015, at 6:43 PM, George Neuner wrote:
> On 6/30/2015 5:34 PM, 'John Clements' via Racket Users wrote:
>> > On Jun 30, 2015, at 8:10 AM, Alexey Cherkaev
>> > wrote:
>> >
>> > ... wouldn't it be beneficial to have such a generalised 'set!'
>> > system-wide? I understand that Racket f
Racket does have 'make-set!-transformer' that allows you to define
syntax that cooperates with 'set!'. I think that might work if you are
defining your own datatype. Have you seen that?
Thanks,
Dave
On 06/30/2015 11:10 AM, Alexey Cherkaev wrote:
Hi Alexander,
Thanks for your reply: I had s
I have implemented generalized `set!` in Racket before, as a cute
exploratory exercise, but I haven't found a sufficiently compelling
benefit of generalized `set!`.
The closest I've imagined to benefit of generalized `set!`: let's say
you had really terse but nice referencing syntax for comple
On Jun 30, 2015, at 5:34 PM, 'John Clements' via Racket Users
wrote:
> Specifically, one of the basic ideas of algebraic languages is that programs
> are compositional. Specifically, if I write (a (b x) c), then the meaning of
> this term depends on the meanings of a, (b x), and c. That is, I
On 06/30/2015 07:27 PM, 'John Clements' via Racket Users wrote:
On Jun 30, 2015, at 3:43 PM, George Neuner wrote:
that's just semantics.
XD
Let me expound a bit on John's pure-functional snooty-poo reply.
Semantics - what programs mean - is everything. Exactly how they're
compiled, inte
> On Jun 30, 2015, at 3:43 PM, George Neuner wrote:
>
> that's just semantics.
XD
--
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to racket-users+unsubscr...
On 6/30/2015 5:34 PM, 'John Clements' via Racket Users wrote:
> On Jun 30, 2015, at 8:10 AM, Alexey Cherkaev
wrote:
>
> ... wouldn't it be beneficial to have such a generalised 'set!' system-wide?
I understand that Racket focusses more on immutable structures, but there are
still vectors and
> On Jun 30, 2015, at 8:10 AM, Alexey Cherkaev
> wrote:
>
> Hi Alexander,
>
> Thanks for your reply: I had something similar in mind (maybe I should check
> out math/array). I was just wondering if there was something more Racket-like
> (it still feels that SRFI is somewhat 'foreign' hack).
As the mentioned SRFI states it:
"This is a proposal to allow procedure calls that evaluate to the "value
of a location" to be used to /set/ the value of the location, when used
as the first operand of |set!|."
The term "location" is only used in the introductory part but for those
who know t
Hi Alexander,
Thanks for your reply: I had something similar in mind (maybe I should
check out math/array). I was just wondering if there was something more
Racket-like (it still feels that SRFI is somewhat 'foreign' hack). And my
last question remains: wouldn't it be beneficial to have such a gen
On Jun 29, 2015, at 5:56 AM, Alexey Cherkaev wrote:
> For example, I was thinking of defining syntax to access my implementation of
> multidimensional arrays
> as
>
> (define-syntax aref
> (syntax-rules (set!)
>[(set! (aref ?a ?i ...) ?v) (array-set! ?a ?i ... ?v)]
>[(aref ?a ?i ...)
Hi all,
Common Lisp has a very useful idiom of SETF that can set values to arbitrary
places. For example, one can set (1 2)-th item of an array A as:
(SETF (AREF A 1 2) 20.0d0)
Scheme preferred way is to use `*-set!` procedures. However, sometimes it is
inconvenient. For example, if I want to
14 matches
Mail list logo