Open dunca opened 1 year ago
@dunca Yes, sometimes naming violates a little bit naming conventions for acronyms, but from the other side we could have our own approach to name IO sources; personally, I prefer to use CSV instead of Csv and HTML instead of Html, I think it looks prettier and clearer
I suppose we discuss your issue a little bit later, in both cases, it should be unified in the different parts of the library
@zaleslaw, is there even a point in having language-official naming conventions, if they're not followed by official libraries? I suppose CSV looking 'prettier' than Csv is subjective, because I think otherwise. readCSV looks out of place next to code from other official libraries. For example, ktor follows the official naming convention for HttpClient.
Probably, you are right, especially regarding what is pretty or not. Of course , it's subjective, as naming conventions is agreed average of the leading subjective opinions.
Thank you for lighting the topic, we are in the Kotlin area and should follow the rules, isn't it?
Also, @dunca if you tasted the library, do you have something to share yet, it will be great to read, regarding interfaces/docs, how is easy to start.
It will be great to read, you could it via issues or discussion thread if it's huge
I agree, it's important for the library to be written as expected. Renamings like these will probably take a lot of time, however. We're looking into a good linter/formatter that can also detect stuff like this, however, with the size of the library we get flooded with hundreds of issues when we enable such a thing. It's probably best to go one file at a time and gradually reformat and rename stuff.
The "Choose good names" section of the Kotlin Coding Conventions documentation, mentions that acronyms longer than two characters shouldn't be capitalized. By capitalizing CSV in class, function, etc. names, the library doesn't follow standard Kotlin naming conventions.
Actual examples from the codebase (list is not exhaustive): org.jetbrains.kotlinx.dataframe.io.CSV org.jetbrains.kotlinx.dataframe.io.CSVType org.jetbrains.kotlinx.dataframe.io.DataFrame.Companion.readCSV org.jetbrains.kotlinx.dataframe.io.DataFrame.Companion.writeCSV
Expected: org.jetbrains.kotlinx.dataframe.io.Csv org.jetbrains.kotlinx.dataframe.io.CsvType org.jetbrains.kotlinx.dataframe.io.DataFrame.Companion.readCsv org.jetbrains.kotlinx.dataframe.io.DataFrame.Companion.writeCsv