lunduniversity / introprog-scalalib

Scala library with simple-to-use utilites for students of introductory programming. http://cs.lth.se/pgk/api
BSD 2-Clause "Simplified" License
60 stars 13 forks source link

Ambigous meaning for parameter `fileName` in `introprog.IO` #14

Open wudse20 opened 3 years ago

wudse20 commented 3 years ago

The documentation in the file introprog.IO for the parameter fileName is a bit ambiguous. After trying to use this library myself and after reading in the course forum in the channel frågor-och-svar, I’ve come to the conclusion that it probably should be renamed to path or add documentation to explain that it’s the path of the file and not just the file name.

bjornregnell commented 3 years ago

Yes,file is probably a better param name than fileName. @jos-rosenqvist-3812 What do you think? Maybe this PR https://github.com/lunduniversity/introprog-scalalib/pull/15 with doc improvement helps to clear the ambiguity enough to make it less urgent to change the param name? After all param name changes can break existing client code and requires update of all examples etc...

bjornregnell commented 3 months ago

A global search on fileName (case sensitive, whole word) in the introprog repo gives 158 ! occurences of fileName so this change is heavy and needs some careful reviewing.