Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[RFC FS-1046] Wildcard self identifier. Allow single underscore in members.#6829

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
KevinRansom merged 4 commits intodotnet:release/fsharp47fromgusty:patch-1
May 27, 2019

Conversation

gusty
Copy link
Contributor

@gustygusty commentedMay 23, 2019
edited
Loading

This allows writing a single underscore in member definitions, iemember _.DoSomething().

matthid, wallymathieu, ErikSchierboom, cartermp, slang25, smoothdeveloper, vasily-kirichenko, ma3yta, Unknown6656, charlesroddie, and 2 more reacted with hooray emoji
@dnfclas
Copy link

dnfclas commentedMay 23, 2019
edited
Loading

CLA assistant check
All CLA requirements met.

@cartermp
Copy link
Contributor

@gusty is there a language suggestion change that maps to this? Generally I'm in favor.

Another interesting one (if you're digging around in there) isfor __ in do:

image

Error message kinda sucks, and the resolution is a double_.

@gusty
Copy link
ContributorAuthor

gusty commentedMay 23, 2019
edited
Loading

Yes, it's approved in principle, seefsharp/fslang-suggestions#333

I've never thought about thefor _ in, I will dig into it, in aseparate PR.

cartermp, auduchinok, and xperiandri reacted with thumbs up emoji

@cartermp
Copy link
Contributor

@gusty Thanks!

@matthid
Copy link
Contributor

Thanks a lot for trying to take care of this wart ;)

gusty reacted with thumbs up emoji

@cartermp
Copy link
Contributor

@gusty
Copy link
ContributorAuthor

gusty commentedMay 23, 2019
edited
Loading

Actually for the renamer you suggested it won't cause problems. I was thinking in the warning mechanisms. For the identifiers starting with underscore it won't be a problem, but for existingmember x. we could issue a warning once this feature is added, but as I said it would be sort of a breaking change.

I had a look at how it works right now and it already considers unused bindings everything that doesn't start with an underscore, so we're good to change the renamer too.

@gustygusty changed the title[WIP] Add Underscore Dot ruleAllow single underscore wildcard self identifier in membersMay 23, 2019
@gusty
Copy link
ContributorAuthor

@cartermp I adjusted the renamer, as you suggested.

cartermp reacted with thumbs up emoji

@gustygusty changed the titleAllow single underscore wildcard self identifier in members[RFC FS-1046] Wildcard self identifier. Allow single underscore in members.May 23, 2019
@KevinRansomKevinRansom changed the base branch frommaster torelease/fsharp47May 26, 2019 23:12
@KevinRansom
Copy link
Contributor

targeting fsharp47

Copy link
Contributor

@KevinRansomKevinRansom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Nice,

thx

Copy link
Contributor

@cartermpcartermp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Love it, thanks a lot@gusty

gusty reacted with thumbs up emoji
@KevinRansomKevinRansom merged commit53c2828 intodotnet:release/fsharp47May 27, 2019
@cartermpcartermp added this to the.NET Core 3.0 milestoneJun 17, 2019
@cartermpcartermp modified the milestones:.NET Core 3.0,16.3Aug 5, 2019
@pauldorehill
Copy link

Love this update, however I noticed that it doesn't work with an accessibility modifier:

type MyType =    { Hello : string }    member private __.WorldOk = "World ok"    member private _.WorldOhNo = "World not ok"

Do you want me to open a separate issue?

@gusty
Copy link
ContributorAuthor

Good catch !

I've just added a PR (#7631) that will cover that case.

brettfo pushed a commit to brettfo/fsharp that referenced this pull requestSep 26, 2019
…mbers. (dotnet#6829)* Add Underscore Dot rule* Update tests* Revert line where x is used* Code fix rename to single underscore
nosami pushed a commit to xamarin/visualfsharp that referenced this pull requestJan 26, 2022
…mbers. (dotnet#6829)* Add Underscore Dot rule* Update tests* Revert line where x is used* Code fix rename to single underscore
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@KevinRansomKevinRansomKevinRansom approved these changes

@cartermpcartermpcartermp approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
16.3
Development

Successfully merging this pull request may close these issues.

6 participants
@gusty@dnfclas@cartermp@matthid@KevinRansom@pauldorehill

[8]ページ先頭

©2009-2025 Movatter.jp