On Friday, August 24, 2018 at 8:39:43 PM UTC-4, Miodrag Milenkovic replied 
to me:
>> Ah, thanks! I spent about an hour trying to figure out inspectors and 
didn't get anywhere, and I never would have guessed that :transparent means 
to make the struct printable. This is the kind of thing I'm looking for: 
very simple stuff that's crucial to know to be productive and usually takes 
only a couple minutes to explain in person but is omitted in documentation.
>
> :transparent is definitely mentioned in the guide chapter on structures, 
maybe ch 5

Yep, section 5.4: 
https://docs.racket-lang.org/guide/define-struct.html#%28part._trans-struct%29
When I first read it, I misunderstood the main point as preventing 
reflection
in order to prevent clients of a library from depending on implementation
details—and promptly put it out of my head as something I could ignore for
now. It didn't occur to me that in everyday programming, you should normally
specify #:transparent when defining a struct. That's the kind of information
I'm looking for--the elementary, practical things that you typically learn 
in
the first few days of pair-programming with someone experienced, or in six
months of beating your head against a new language completely on your own.
(I'd prefer not to go the latter route.)

Ben

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to