Skip to content
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

Feature Request: allow currently mandatory, but syntactically redundant, braces to be optional #181

Closed
6 tasks
DavidArno opened this issue Feb 24, 2017 · 18 comments

Comments

@DavidArno
Copy link

  • Proposal added (draft created at Redundant-brace-removal.md, pull request #180)
  • Championed
  • Discussed in LDM
  • Decision in LDM
  • Finalized (done, rejected, inactive)
  • Spec'ed

This proposal pulls together a couple of related proposals around removing the need to use {}, rather than ; to terminate a declaration, along with two new opportunities to do so, in the following areas:

@HaloFour
Copy link
Contributor

Not a fan of the proposed auto-implemented property syntax:

public string Name get;

@DavidArno
Copy link
Author

@HaloFour,

That's a shame, as that is my favourite of the four. The { get; } syntax bugs me every time I have to write/read it. Different strokes...

@alrz
Copy link
Member

alrz commented Feb 24, 2017

Nit: you've conflated using statements and using directives. similarly, namespace declarations vs. namespace directives.

@JamesFaix
Copy link

Overall I like this idea, but also disagree with the auto-property component. It can help disambiguate method or constructor bodies with no implementation by intention, vs bodies where the creator forgot to implement a stub or throw NotImplementedException.

@DavidArno
Copy link
Author

@JamesFaix & @HaloFour,

I'd value your opinions here. As I seem in a minority of one on the auto-property change, should I update the proposal and submit a new PR without it, or leave it as a discussion point?

@iam3yal
Copy link
Contributor

iam3yal commented Feb 25, 2017

@DavidArno Is it really redundant?

To me public string Name get; reads almost as if I declared a variable and it might be confusing, I mean, a single space dictates whether this is a variable or not.

There's so many ways to define properties that it's a bit overwhelming and there's more on the way..

Anyway, what's wrong with braces? I'm probably one of few that really like them:

if (text == null)
{
	throw new ArgumentNullException(nameof(text));
}

😄

@DavidArno
Copy link
Author

Closing as this proposal is mainly drawing negative feedback.

@iam3yal
Copy link
Contributor

iam3yal commented Feb 25, 2017

@DavidArno I don't know whether you directed this reply at me but it's pretty rude to say that it's negative just because we share different opinions.

You didn't even reply to me... if anything I'd say that's a negative and unacceptable attitude.

@jnm2
Copy link
Contributor

jnm2 commented Feb 25, 2017

@eyalsk I thought your questions were rhetorical. I don't think he realized that would communicate rudeness to anyone- and I didn't think it was rude. It's kind of awkward to handle negative feedback; it can kind of feel like everyone ganging up on you.

@iam3yal
Copy link
Contributor

iam3yal commented Feb 25, 2017

@jnm2

I thought your questions were rhetorical.

It was, when I said he didn't reply to me I meant that he decided to close the post right after I reply and didn't bother to say something positive before that and all I got is that my reply was negative, period.

I don't think he realized that would communicate rudeness to anyone- and I didn't think it was rude.

Well, that's your opinion, I think it was extremely rude, to the point it disgust me! we probably interpret things differently.

It's kind of awkward to handle negative feedback; it can kind of feel like everyone ganging up on you.

I really don't understand this, why would you interpret disagreement as negative feedback? what's awkward is to close posts that aren't even a day long after few people said they disliked it.

@HaloFour
Copy link
Contributor

@DavidArno

Only a couple of opinions. Always worth eliciting more feedback. While I don't prefer the property syntax you suggested, I'm fine with how this proposal works with interfaces and constructor bodies. Possibly with empty classes, too. Although then you may have to consider how the very similar syntax relates to records.

@jnm2
Copy link
Contributor

jnm2 commented Feb 25, 2017

@eyalsk I'm positive you're misinterpreting. "Negative feedback" means no more, no less, than a down vote. "Negative feedback" does not mean the feedback is bad, nor does it imply that the feedback was given in bad faith.

we probably interpret things differently.

And that's okay!! :-) I just want to provide a data point that other interpretations exist. It's always better to choose the interpretation that gives the benefit of the doubt. Hanlon's razor etc.

@iam3yal
Copy link
Contributor

iam3yal commented Feb 25, 2017

@jnm2 Yes might be my bad interpretation but I think that it's more useful to say "Closing this because it seems like people dislike it." as opposed to "Closing as this proposal is mainly drawing negative feedback." which leaves a lot of place to imagination and/or doubt.

@jnm2
Copy link
Contributor

jnm2 commented Feb 25, 2017

@eyalsk

Yes might be my bad interpretation but I think that it's more useful to say "Closing this because it seems like people dislike it." as opposed to "Closing as this proposal is mainly drawing negative feedback." which leaves a lot of place to imagination and/or doubt.

You may be right about that. We all learned something here... :-D

@iam3yal
Copy link
Contributor

iam3yal commented Feb 25, 2017

@jnm2 I hope. 😉

@DavidArno
Copy link
Author

@eyalsk,

I don't know whether you directed this reply at me but it's pretty rude to say that it's negative just because we share different opinions.

I'm really sorry: that wasn't my intention at all. The proposal itself has only down-votes, @HaloFour's comment that he wasn't a fan of the getter syntax was upvoted and the feedback from others was that they didn't like it either. To my mind that's negative feedback, which I've listened to as it was constructive as well. So I closed it, with the intention of removing the getter idea and creating a new PR and proposal.

I've been trying recently to be more polite and positive in my comments. I see I've a way to go if I'm still coming across as rude. So apologies once more for inadvertently being rude here.

@iam3yal
Copy link
Contributor

iam3yal commented Feb 25, 2017

@DavidArno Sorry for my late reply.

Thank you David, I really respect you and I think that this was enough to get me triggered, I usually a lot more restrained so sorry for misjudging you, I apologize.

@kingces95
Copy link

kingces95 commented Aug 28, 2017

For what my opinion is worth, and that's not much, I like the idea of dropping the brackets on the .ctor. Maybe it's better to open separate issues for each change. That way we know to what the +1 and -1 are in response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants