1) Would you consider a PR (from me) for `parser-tools` that updates the names to be consistent (while preserving the older ones of course)? Or is there too much water under the bridge to bother with?
2) Relatedly: is the field ordering used by the `srcloc` struct — line / column / position / span — recommended for other interfaces to follow, or considered arbitrary? On Thursday, December 8, 2016 at 2:02:58 PM UTC-8, robby wrote: > > It may be that at the time the parser-tools were developed, we were > not yet using a struct for srclocs. I think today we would not do what > the parser tools are doing. > > Robby > > > On Thu, Dec 8, 2016 at 12:44 PM, Matthew Butterick <[email protected] > <javascript:>> wrote: > > Forgive the possibly noobish question. > > > > Racket's name for a precise place in a source file is called a source > > location [1] — sometimes abbreviated `srcloc` — and has four possible > > fields: line, column, position, and span. > > > > The `parser-tools/lex` library also dabbles in source locations, but > IIUC > > calls them "positions" rather than "locations" [2]. Moreover, what is > known > > as the "position" field in a Racket source location is called an > "offset" in > > `parser-tools/lex`. [also 2] > > > > So is it fair to say that `parser-tools/lex` is using names that are > > inconsistent with Racket (and, in the case of "position", > contradictory)? > > > > > > [1] > > > http://docs.racket-lang.org/reference/exns.html?q=srcloc#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._srcloc%29%29 > > > > > [2] > > > http://docs.racket-lang.org/parser-tools/Lexers.html#%28def._%28%28lib._parser-tools%2Flex..rkt%29._position%29%29 > > > > > -- > > 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] <javascript:>. > > To post to this group, send email to [email protected] > <javascript:>. > > To view this discussion on the web visit > > > https://groups.google.com/d/msgid/racket-dev/B26F0406-4DA6-42F9-83DE-9C2D4BE9C90A%40mbtype.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/6c39af00-93dd-483b-874b-bdb2e64ac3a8%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
