Skip to content

code style questions #1940

Closed Answered by olanti-p
scarf005 asked this question in Q&A
Oct 3, 2022 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

While I agree with most of these points in favor of auto in general (Rust uses similar style, where names go before types, and it's quite convenient), I'm not sure whether they'd be viable for BN.

function returns

That's the first time I'm seeing such "modern" style tbh. Everyone is familiar with the classic style, almost every codebase out there uses it, all our dependencies use it, and I highly doubt we have any usages of the "modern" style either.

Using auto here would just go against the unspoken established style, and further confuse many contributors who don't have a strong grasp on modern C++ features.

Alternative solution here is just to separate return type and function name by…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@scarf005
Comment options

scarf005 Oct 5, 2022
Maintainer Author

Answer selected by scarf005
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants