# On the arbitrariness of truth(iness)

**URL:** https://discourse.julialang.org/t/on-the-arbitrariness-of-truth-iness/81381
**Category:** Internals & Design
**Created:** [May 20, 2022, 3:32pm UTC](https://discourse.julialang.org/t/on-the-arbitrariness-of-truth-iness/81381 "2022-05-20T15:32:55Z")
**Posts on this page:** 1
**Showing post:** 56

<div class="post-metadata">

### Author: ![uniment](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/uniment/32/24532_2.png) [@uniment](https://discourse.julialang.org/u/uniment)
#### Post date: [March 25, 2023, 7:04am UTC](https://discourse.julialang.org/t/on-the-arbitrariness-of-truth-iness/81381/56 "2023-03-25T07:04:13Z")

</div>

I suppose there’s also a hypothetical future in which Julia’s parsing rules change such that numeric literals are callable. Then it’d be trivial to define:

```julia
(x::Number)(y::Number) = x*y # for backwards-compatibility
(x::Number)(b::Bool) = b ? x : zero(x) # for indication

```

In addition to `1(p::Bool)` serving as an indicator, this concept also has the advantage(?) that the product `(a+b)(c+d)` would become valid.

> [@jar1](#):
>
> What does it look like in code?

Suppose I wish to calculate the sum of non-negative values of `xs`. Since indicating is implicit, I might write:

```julia
(xs .≥ 0)' * xs

```

If `Bool` identified with infinite values, we’d need an explicit indicator and be forced to write a longer expression such as:

```julia
1.(xs .≥ 0)' * xs

```

---

_[View the full topic](https://discourse.julialang.org/t/on-the-arbitrariness-of-truth-iness/81381)._
