Curly Should curly braces appear on their own line or not?
##Moderator Message
This question already has 40 answers. Therefore, there is a very good chance that your answer has already been provided. Please take a moment to review all the answers before posting.
Should curly braces be on their own line or not? What do you think about it?
if (you.hasAnswer()) {
you.postAnswer();
} else {
you.doSomething();
}
or should it be
if (you.hasAnswer())
{
you.postAnswer();
}
else
{
you.doSomething();
}
or even
if (you.hasAnswer())
you.postAnswer();
else
you.doSomething();
Please be constructive! Explain why, share experiences, back it up with facts and references... ;-)
Curly braces on their own line or not?
##Moderator Message
This question already has 40 answers. Therefore, there is a very good chance that your answer has already been provided. Please take a moment to review all the answers before posting.
Should curly braces be on their own line or not? What do you think about it?
if (you.hasAnswer()) {
you.postAnswer();
} else {
you.doSomething();
}
or should it be
if (you.hasAnswer())
{
you.postAnswer();
}
else
{
you.doSomething();
}
or even
if (you.hasAnswer())
you.postAnswer();
else
you.doSomething();
Please be constructive! Explain why, share experiences, back it up with facts and references... ;-)
Should curly braces appear on their own line?
Should curly braces be on their own line or not? What do you think about it?
if (you.hasAnswer()) {
you.postAnswer();
} else {
you.doSomething();
}
or should it be
if (you.hasAnswer())
{
you.postAnswer();
}
else
{
you.doSomething();
}
or even
if (you.hasAnswer())
you.postAnswer();
else
you.doSomething();
Please be constructive! Explain why, share experiences, back it up with facts and references.
##Moderator Message
This question already has 40 answers. Therefore, there is a very good chance that your answer has already been provided. Please take a moment to review all the answers before posting.
Should curly braces be on their own line or not? What do you think about it?
if (you.hasAnswer()) {
you.postAnswer();
} else {
you.doSomething();
}
or should it be
if (you.hasAnswer())
{
you.postAnswer();
}
else
{
you.doSomething();
}
or even
if (you.hasAnswer())
you.postAnswer();
else
you.doSomething();
Please be constructive! Explain why, share experiences, back it up with facts and references... ;-)
Should curly braces be on their own line or not? What do you think about it?
if (you.hasAnswer()) {
you.postAnswer();
} else {
you.doSomething();
}
or should it be
if (you.hasAnswer())
{
you.postAnswer();
}
else
{
you.doSomething();
}
or even
if (you.hasAnswer())
you.postAnswer();
else
you.doSomething();
Please be constructive! Explain why, share experiences, back it up with facts and references... ;-)
##Moderator Message
This question already has 40 answers. Therefore, there is a very good chance that your answer has already been provided. Please take a moment to review all the answers before posting.
Should curly braces be on their own line or not? What do you think about it?
if (you.hasAnswer()) {
you.postAnswer();
} else {
you.doSomething();
}
or should it be
if (you.hasAnswer())
{
you.postAnswer();
}
else
{
you.doSomething();
}
or even
if (you.hasAnswer())
you.postAnswer();
else
you.doSomething();
Please be constructive! Explain why, share experiences, back it up with facts and references... ;-)
- 8.2k
- 14
- 60
- 95
Should curly braces be on their own line or not? What do you think about it?
if (you.hasAnswer()) {
you.postAnswer();
} else {
you.doSomething();
}
or should it be
if (you.hasAnswer())
{
you.postAnswer();
}
else
{
you.doSomething();
}
or even
if (you.hasAnswer())
you.postAnswer();
else
you.doSomething();
Please be constructive! Explain why, share experiences, back it up with facts and references... ;-)
Should curly braces be on their own line or not? What do you think about it?
if (you.hasAnswer()) {
you.postAnswer();
} else {
you.doSomething();
}
or should it be
if (you.hasAnswer())
{
you.postAnswer();
}
else
{
you.doSomething();
}
or even
if (you.hasAnswer())
you.postAnswer();
else
you.doSomething();
Should curly braces be on their own line or not? What do you think about it?
if (you.hasAnswer()) {
you.postAnswer();
} else {
you.doSomething();
}
or should it be
if (you.hasAnswer())
{
you.postAnswer();
}
else
{
you.doSomething();
}
or even
if (you.hasAnswer())
you.postAnswer();
else
you.doSomething();
Please be constructive! Explain why, share experiences, back it up with facts and references... ;-)