AlexKnauth / syntax-sloc

counts the number of source lines of code in a racket syntax object
MIT License
3 stars 1 forks source link

Naming? #9

Open jackfirth opened 7 years ago

jackfirth commented 7 years ago

The name syntax-sloc for the package and collection is a bit odd, since the package provides line counts for things other than just syntax objects. What do you think of naming the package and collection sloc? The existing modules in the syntax-sloc collection could be renamed to sloc/syntax, sloc/file, sloc/directory, and sloc/pkg. It might be simpler to just not bother with separate modules though.

AlexKnauth commented 7 years ago

The main thing that makes it different from other line-counting tools is that it goes through the source locations of syntax objects. So even for a #lang whitespace or something it would still count the number of lines that had the type of whitespace that would be significant for code, without the type of whitespace that's for actual whitespace and comments.

jackfirth commented 7 years ago

Does that need to be specified in the collection name though? Being a Racket package alone seems like enough to imply to me that it only works on Racket code (in the sense of any file with a #lang, not any file written in #lang racket) and therefore might use some Racket trickery with syntax objects to determine what lines to count.

This is the nittiest of nitpicks, so don't take me too seriously here.