leif
2017-9-29 20:12:58

Is using define-local-member-name supposed to interact with your init list in Racket Classes?, such as in this example: https://gist.github.com/LeifAndersen/05c46b068249b0d7312b635e993327b0


leif
2017-9-29 20:12:59

leif
2017-9-29 20:15:17

This error also persists if you replace the init-field line with: (init [(internal-hello hello)]) (field [hello internal-hello])

Which is really odd to me.


leif
2017-9-29 20:57:12

Hmm…looking at the fully expanded macro, I’m inclined to think this is possibly a bug in extract-arg or validate-local-member


ryanc
2017-9-29 21:31:01

@leif from the docs for define-local-member-name: “Thus, methods, fields, and initialization arguments declared with such external-name ids are accessible only in the scope of the define-local-member-name declaration.”


leif
2017-9-29 21:31:51

@ryanc Bleh, thanks, I missed that.


leif
2017-9-29 21:32:47

In that case, is there any way I can have the external name for an init variable be the same as a private field?


leif
2017-9-29 21:33:30

(Or rather, private in that instances of a class can access it for any object, like you would do in a copy method.)