-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
2020-07-17_naming_optimization_problem #8
Comments
Depending on the language/tool you're in, there are other properties that may communicate what a thing is or does. For example, in C# in Visual Studio, it's a bit excessive to call a method It is sometimes necessary to model a single concept with multiple different classes as it travels through your application. For example, you may have a database entity, a business model, and a view model, all for the single concept of "User". It is reasonable to create |
Yes, I typically favor this naming convention. Sometimes there is another method like The idiomatic way to code this in F# is to use functions, which cannot be overloaded. Attempting to overload F# functions results in shadowing. I find it interesting to contrast this difference between C# and F#. On the one hand, method overloading is one approach to expressing alternative ways to achieve the same result. As an example, @cmeeren decided on this approach for the binding API in Elmish.WPF, which is written in F#. On the other hand, a unique name for each function makes things very clear, and the absence of function overloading probably makes F#'s type inference easier to implement (perhaps even possible).
Oh, yes. I am glad that you reminded me of this. I was recently refactoring some F# code from
to
as Scott Wlaschin discusses here. Where Scott called the type As a side note, I am refactoring from the organization that Scott says is more idiomatic of functional languages to one that is "more .NET like". One difference between Scott's code and mine is that I am still using a top-level module (instead of a top-level namespace). I wonder if he would be favor of my organization. |
I just happened to watch a talk that is partly about naming and its importance in communication. The whole talk is about 70 minutes, but the part about naming starts here and lasts 10 minutes. Here are some particularly relevant quotes. In the words of my post, I think it is fair to define "label" as he uses it as "a name that communicates a minimal amount of information."
|
Naming Optimization Problem
https://tysonwilliams.coding.blog/2020-07-17_naming_optimization_problem
The text was updated successfully, but these errors were encountered: