-
Notifications
You must be signed in to change notification settings - Fork 13
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
About naming #27
Comments
Imho ideally it would just extend |
The problem is that since The other alternative would be to not forward operations to the contained value, which makes working with |
change toJSON() to toString() |
change JSONValue to JSONObject ? |
The problem is that many of these functions are highly ambiguous. Does |
@s-ludwig length is not so much problem, it's really better to add several letters, than get problem when people do not understand what function do by it's name. What do you understand by |
can use toJsonString() and toJsonValue() names. |
The problem with "Json" is that this needs to adhere to http://dlang.org/dstyle.html, which specifies that acronyms must be written all-uppercase. But I agree that it reads a lot mode lightweight. For that reason I've used another rule for vibe.d, where acronyms that are pronounced as a single word are still written in camel case, but that can't be applied here.
I agree, but there have been strong opposing voices in the review process. It was argued to drop "JSON" from all names, which would result in code such as
|
@s-ludwig I can't remember situations where additional quotes like Maybe it's better to make generation of Sometimes it's very hard to understand where I should to use |
Well, |
For me naming looks very strange. For example
toJSON
Converts the given JSON document(s) to its string representation
, but by it's name I expect that it should convert string to json.The text was updated successfully, but these errors were encountered: