-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Make var
/let
...else
proposal
#1758
Comments
@josh11b - can do this. ETA: Sunday. |
Hey I want to make my first contribution. Can I work on this issue? |
@PramodhTVK Could you collaborate with @rscircus on #1871 ? I've commented on that PR what we are looking for in this proposal. |
Sure thing. But pls don't mind me if I pester you too much, since this is my first ever contribution. |
Hey @PramodhTVK - alright. :) Welcome joining that one. Guess you saw that being tagged as 'good first issue'. So here is my rationale so far and what I am thinking about even though not blarghing everything into here: Scope
Where are we / am I right now? Needed a while to understand the motivation and also differentiate between the current fashion and what makes sense. So I am still gathering good data and arguments in shape of reading papers and through other languages. That had a little ramp up as designing computer languages involves touching many different fields. For now I am thinking about a more intuitive alternative and am including all given arguments. It took me a while to grok the concept, so I don't think, it's too obvious to the unenlightened. Actually reading through Swift's guard pattern made it click for me, so the guard keyword -- even though adding a keyword -- made the concept more clear and explained why |
I will definitely look into it. Is it fine if I take up some time? |
Where can I find the link to the discord group? |
https://github.com/carbon-language/carbon-lang#join-us |
@PramodhTVK - feel free to continue on this one. I am redirecting my energy to other FLOSS work. |
Sure Ill look into it. |
FYI, Rust has recently stabilized |
@josh11b @rscircus @geoffromer I would like to work on this |
Hi @ashutosh887 - good to hear. If you need any help to get started, let me know. :) |
On that birthday-comment of mine I replied to a similar comment by @josh11b here: #1871 (comment) where I looked at the other side of the coin. So overall I am not sure it is such a practical feature actually. |
Thanks @rscircus . Please assign me the issue |
@ashutosh887 We typically won't assign issues. I've added some documentation for why. Please feel to work on it if you have time, but please through the proposal process to get a better understanding of what to expect. Also, just to note -- I've checked with josh11b, and considering the proposal process, I've unmarked this as a "good first issue". |
The corresponding feature in Swift is considered a "delight" |
@josh11b - that blog article you are linking to is a blog series of @jrose-apple - Jordan Rose who is blogging about „Regrets“ and „Delights“ of Swift he saw after their developments. One „delight“ was the guard pattern for Optionals as far as I understand this post. There are multiple. Also multiple regrets unfortunately. Or did you want to point out that it‘s such a delightful feature? 😏 |
I am out of this discussion since a while and also changed countries, so forgive my question: Is this feature proposal focusing on an ‘Optional‘ like feature? I remember it being rather general. Considering Optionals it makes sense, but generally? |
I would recommend aiming for a more general feature, for a few reasons:
|
PR #1388 should be made into a proposal. It just needs the proposal template filled out, with background, rationale, and alternatives. My expectation is that a lot of the rationale can come from looking at how well it has gone in other languages, which likely have already articulated how this feature is good for dealing with the unexpected cases without continually indenting right, for example:
The proposal process is described here: https://github.com/carbon-language/carbon-lang/blob/trunk/docs/project/evolution.md .
I in particular recommend the
proposals/scripts/new_proposal.py
script.The text was updated successfully, but these errors were encountered: