Welcome to sessionless Discussions! #20
Replies: 2 comments 3 replies
-
public key:I suggest staying away from language keywords such as public and private and keeping the Example: c# won't allow using public/private as names.. But it works if following c# naming rules (PascalCase) like "Public".. However it still feels wrong imo even tho it works user uuid:userUUID is more expressive and intuitive than or uuid alone also userUuid just looks weird.. Some things look ok like this but UUID shall stay UUID 👽 time stamp:timestamp in my mind usually refers to unix time (int64) As for snake_case... I personally hate having to click shift to type _ ... And it just doesn't look pleasing imo At least that's what I think |
Beta Was this translation helpful? Give feedback.
-
If we're taking the language specifications into the account Rust uses snake_case, but there shouldn't be an issue with any naming conventions as it's possible to manually specify it for the serialization. #[serde(rename_all="camelCase")]
pub struct PayloadRegister {
pub public_key: String,
pub timestamp: String,
pub entered_text: String,
} As for the That's why I suggest:
|
Beta Was this translation helpful? Give feedback.
-
Standardizing naming, and message structure:
So since each server implementation might get requests from clients in other languages, we need to standardize naming of the shared properties. Those are:
user uuid
time stamp
public key
I went with the JavaScript way of doing the three (camelCase) because of web being such a big use case. So those would become:
userUUID
timestamp
publicKey
I like this because though not all languages use camelCase, I feel it won't be unfamiliar to anyone implementing Sessionless.
I think the other reasonable option is snake_case:
user_uuid
timestamp
public_key
I don't like
userUuid
for totally nitpicky reasons.Beta Was this translation helpful? Give feedback.
All reactions