Skip to content

Library doesn't follow official naming conventions #383

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
dunca opened this issue May 28, 2023 · 6 comments
Open

Library doesn't follow official naming conventions #383

dunca opened this issue May 28, 2023 · 6 comments
Assignees
Labels
help wanted Extra attention is needed, feel free to help :)
Milestone

Comments

@dunca
Copy link

dunca commented May 28, 2023

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

@zaleslaw
Copy link
Collaborator

@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

@zaleslaw
Copy link
Collaborator

I suppose we discuss your issue a little bit later, in both cases, it should be unified in the different parts of the library

@dunca
Copy link
Author

dunca commented May 29, 2023

@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.

@zaleslaw
Copy link
Collaborator

zaleslaw commented May 29, 2023

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?

@zaleslaw
Copy link
Collaborator

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

@Kotlin Kotlin deleted a comment from zaleslaw May 30, 2023
@Jolanrensen Jolanrensen added this to the Backlog milestone May 30, 2023
@Jolanrensen Jolanrensen reopened this May 30, 2023
@Jolanrensen
Copy link
Collaborator

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.

@zaleslaw zaleslaw added the good first issue Good issues to pick-up for newcomers label Sep 8, 2023
@zaleslaw zaleslaw added help wanted Extra attention is needed, feel free to help :) and removed good first issue Good issues to pick-up for newcomers labels Apr 8, 2024
@Jolanrensen Jolanrensen self-assigned this Aug 20, 2024
@Jolanrensen Jolanrensen mentioned this issue Aug 20, 2024
28 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed, feel free to help :)
Projects
None yet
Development

No branches or pull requests

3 participants