think it should definetly exist.
doing this in sema would allow for different casing rules depending on the type of content (my opinion is of functions to follow camel casing, and variables follow snake casing, and types follow pascal)
but things to consider are libraries and apis. i think this can be best achieved with future layers that make case conversions for JSON and libraries easier, so that blight code can be consistant even if outside sources are not.
Milestone: 0.3.0.
plan:
@ escaping syntax must adhere to
_.check_casing_semantics), to add warnings when you do let foo = getSomething();, where foo is initialized to type, where the casing is wrong, but the fact it is wrong is not known until semantic analysis@ syntax opts out of the above checks. the purpose of an @ identifier is to say that the identifier has a has some reason to use a non-standard, such as @"Content-Type"pub const Casing = enum {
none,
/// some_value
snake,
/// someValue
camel,
/// SomeValue
pascal,
pub fn detect(str: []const u8) Casing {}
};
pub const Type = enum {
pub fn expectedCasing(t: Type) Casing {}
};