On Fri, Oct 28, 2016 at 5:29 AM, Laurent <[email protected]> wrote: > > My 2 cents (unknown currency): > > I like this too, and I've wanted to use this a few times in the past. > > Regarding the names, since 'module+' also defines a name, it wouldn't be very > consistent to prefix the new one with "define-". I also worry a little about > creating a whole zoo of module declarations.
I feel like something must be unclear... ``` (module+ X body ...) ``` defines the module X in pieces as a `module*` with #f as the lang This new form, `(define-module+ ADD-TO-X X L)`, defines the module X as a `module` with L as the lang AND defines a macro that works just like module+ (except you don't give it a name) called ADD-TO-X that adds stuff to X's body. So it is called `define-module+` because it defines something like `module+` as its main job. Its companion, `define-module*+` is the same, but defines the module as a `module*` > Wouldn't it be possible to add a keyword to the module+ declaration, like > (module+ duck+ #:name duck #:lang racket/base ...) > where by default the name would just be duck+? There's no point to #:name on module+. The only reason you need the name with `define-module+` is that it defines two things: the ADD-TO-X and X. It would be possible to change `module+` to specify the language in the way you suggest, except it's easier to imagine making a mistake by having the keyword multiple times or inconsistently, etc. > This means we can use #:declared on a module+, but I don't know how it works. Yes. You can already do that with my implementation. It "seals" the module and refuses to allow any more body syntax. Jay > > Laurent > > On Fri, Oct 28, 2016 at 1:17 AM, Matthias Felleisen <[email protected]> > wrote: >> >> >> I like this. How does define-duck+ communicate with DrRacket? >> >> >> On Oct 27, 2016, at 3:53 PM, Jay McCarthy <[email protected]> wrote: >> >> Something that has annoyed me about module+ since we first implemented it >> was that you couldn't make `module`s using it and you couldn't specify the >> module language (it is always `module*` with `#f` as the language.) >> >> When I originally did it, I left that out because I didn't want the weight >> of it and for them to be inconsistent and when Matthew made the more >> beautiful implementation in #%kernel, he kept it that way. >> >> I've gone back and made the implementation support this via a >> `define-module+` and `define-module*+` form. Please take a look at this >> example file and let me know any opinions you have: >> >> https://github.com/jeapostrophe/exp/blob/master/module/ex.rkt >> >> In particular, should this be in racket? Should it be a package? Should it >> be in remix? Should have a different name, because obviously you know a >> better one? >> >> Jay >> >> -- >> Jay McCarthy >> Associate Professor >> PLT @ CS @ UMass Lowell >> http://jeapostrophe.github.io >> >> "Wherefore, be not weary in well-doing, >> for ye are laying the foundation of a great work. >> And out of small things proceedeth that which is great." >> - D&C 64:33 >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Racket Developers" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To post to this group, send email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/racket-dev/CAJYbDaktv5qPo%3D6ymSaG1QC03jWAHGzHrpNtdPb0403H8exSQg%40mail.gmail.com. >> For more options, visit https://groups.google.com/d/optout. >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Racket Developers" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To post to this group, send email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/racket-dev/BFD788CE-9EEE-4A8F-9164-EAD9A771866C%40ccs.neu.edu. >> >> For more options, visit https://groups.google.com/d/optout. > > > -- > You received this message because you are subscribed to the Google Groups > "Racket Developers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/racket-dev/CABNTSaFjtb%2BO5eW8rgacAJDLosCu%2B29uKAt%2BoH%3DK%2B9nonV7dQg%40mail.gmail.com. > > For more options, visit https://groups.google.com/d/optout. -- Jay McCarthy Associate Professor PLT @ CS @ UMass Lowell http://jeapostrophe.github.io "Wherefore, be not weary in well-doing, for ye are laying the foundation of a great work. And out of small things proceedeth that which is great." - D&C 64:33 -- You received this message because you are subscribed to the Google Groups "Racket Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-dev/CAJYbDak6a7RvkX-_s%3DbeVUypFRGX2gEDtwjBLk%2B1KRtk-kEMFQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
