Worst ideas/features in programming lang
Basile B.
b2.temp at gmx.com
Thu Oct 28 10:43:21 UTC 2021
On Thursday, 28 October 2021 at 10:41:23 UTC, Basile B. wrote:
> On Thursday, 28 October 2021 at 10:34:28 UTC, Basile B. wrote:
>> On Wednesday, 27 October 2021 at 18:35:24 UTC, Ola Fosheim
>> Grøstad wrote:
>>> On Wednesday, 27 October 2021 at 17:41:40 UTC, Basile B.
>>> wrote:
>>> [...]
>>> But, if you don't allow implicit conversion to/from bool then
>>> the compilation stage should catch most such typos in the
>>> type system. So the impact of syntax also depends on language
>>> semantics.
>>
>> Yeah, that's a point of agreement.
>
> BTW "to bool", as you saiy, is **not an implicit conv**... it's
> more a special case that **only** happens when a condition is
> evaluated so `if` condition, `while` condition, CondExp
> condition, AssertExp, and I think that's all.
>
> That detail is important to understand why pascal `and` works
> perfectly with both numbers and booleans ;)
it's because it does not do that. If it does, then `and` is
directly broken.
More information about the Digitalmars-d
mailing list