Conversation
|
I was not too sure about were to put the Changes entry, so it went into "languages feature". |
|
In the object language we have ( |
I don't know, I like the current semantic of
Maybe the solution is to use the
|
|
In any case, I am fine with the |
|
@gasche : In objects, you know in the definition of a class what you are shadowing. Regardless of warning emission or not, this redefinition doesn't leak to the code using the object. For a module, it's the opposite. I don't feel like a declaration-level shadowing annotation make sense, and it would reduce the value of warnings 44/45. |
I assume you mean |
In practice the M.() notation can lead to very nasty bugs and we should not encourage people to override the warning via M.!(). I would really be in favour of not introducing such a notation. It seems to me that what @gasche proposes on the mailing list, is a much better solution. I.e. split warning 44 in two, one for alphanumerical identifiers, enabled by default, which makes M.() usage much less dangerous w.r.t. to API evolution and one for operators, not enabled by default, which are less likely to cause problems in practice. This would also lead to a better error user experience when you do things like: let sub = String.sub s 3 6 in
let s = String.(uppercase @@ trim sub) |
|
The issue I personally have with your/gache's proposal is that edsl are not only for operators. I do agree with the whole idea, though. |
Sure there may be constants, functions etc. but one can argue in that in this case it would be bad style/misleading from a code reading perspective to use the same identifiers in scope and the proposal prevents that aswell. |
|
Well having several monad modules that export |
Usually |
|
Would anyone else like to weigh in on this feature? I'm biased because I don't like use of local open anyway, but I do wonder if we should just wait for modular implicits, which will presumably help many of these use cases anyway. |
|
This was discussed in the developer meeting two days ago, where nobody was willing to support it, so we decided to close. |
Use size in words for all minor heap sizes
* add milestones component and history page
This proposal adds the syntax
M.!( ... )which opens a module locally but silent the shadowing warnings. It is similar to both the shortcut local open syntaxM.( ... )and the shadowing local open syntaxlet open! M in ...The proposal is motivated by two points:
Half of this proposal, and in particular the tests, were done by @Octachron, big thanks to him!