The year is 2019
12345swordy
alexanderheistermann at gmail.com
Sun Jul 28 01:47:21 UTC 2019
On Sunday, 28 July 2019 at 00:45:54 UTC, Exil wrote:
> On Saturday, 27 July 2019 at 19:49:32 UTC, 12345swordy wrote:
>> On Saturday, 27 July 2019 at 18:50:16 UTC, Exil wrote:
>>> On Saturday, 27 July 2019 at 16:12:35 UTC, 12345swordy wrote:
>>>> On Saturday, 27 July 2019 at 09:04:45 UTC, Mike Franklin
>>>> wrote:
>>>>
>>>>> I would be perfectly happy with `opImiplicitCast` or some
>>>>> way to have implicit constructors. But Walter has already
>>>>> voiced his disapproval of that (See the comments in
>>>>> https://github.com/dlang/dmd/pull/10161 for the
>>>>> disappointment), so our choices are getting slim. I'm
>>>>> trying to find something he would be willing to approve. If
>>>>> you have any ideas, I'm all ears.
>>>>>
>>>>> Mike
>>>>
>>>> We shouldn't let Walter disapproval effect us. If we think
>>>> it a really good idea then we should pursuit it.
>>>>
>>>> Walter thinks the opImplicitCast that we are proposing will
>>>> be the same thing as C++. It isn't. C++ genius "idea" is to
>>>> have implicit conversions opt-out rather then opt-in.
>>>>
>>>> -Alex
>>>
>>> I don't agree. C++ strings are a good source of how it can be
>>> misused.
>>
>> Any feature can be abused by a stubborn person. That is merely
>> a case of bad coding practice rather then the feature itself.
>
> Not every feature can be abused.
I recall my programming instructor scolded me for abusing basic
functions.
> This one is far more easily abused than others, and people will
> use it for >"convenience" as I have seen them complain about
> before.
Examples?
> It makes it harder to read code, to maintain code.
Opinion.
Also you can make the same argument regarding the goto statement.
> It is the feature itself.
The goto feature exist. You want to argue for deprecation for
that feature?
> If you need to use it in such a small amount of code so that it
> isn't abused, then it isn't really something you need.
What language are you talking about here? Not every language
implements implicit conversions the same way. For example C#
rules for implicit conversions is much stricter then C++.
Alex
More information about the Digitalmars-d
mailing list