Hello,

While we are at it: is it theoretically possible in Racket or Typed Racket (or 
will be possible in Racket 2 or Typed Racket 2) to access struct fields without 
repeating the name of the struct type again?

Like in C

typedef struct
{
  double x;
  double y;
} VeryLongStructureName;

VeryLongStructureName a;

double z = a.x + a.y;


The analogous Racket code for the last line would be

(define z (+ very-long-structure-name-x a) (+ very-long-structure-name-y a))

and I am wondering whether it can be shortened to something like (define z (+ 
(. x a) (. x b)))

(I know that match can work with structs, but it is not always as convenient as 
the C way with the dot)


Best regards,

Dmitry


--
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/d23df714-e808-91f3-b978-29bcca849100%40iaaras.ru.
For more options, visit https://groups.google.com/d/optout.

Reply via email to