# Weird Idiom: Labeling Values?

**URL:** <https://revolt.metaeducation.com/forum/t/weird-idiom-labeling-values/1500>\
**Category:** Show & Tell\
**Created:** [February 10, 2021, 7:21pm UTC](https://revolt.metaeducation.com/forum/t/weird-idiom-labeling-values/1500 "2021-02-10T19:21:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hostilefork](https://revolt.metaeducation.com/forum/user_avatar/revolt.metaeducation.com/hostilefork/32/421_2.png) [@hostilefork](https://revolt.metaeducation.com/forum/u/hostilefork)\
**Post date:** [February 10, 2021, 7:21pm UTC](https://revolt.metaeducation.com/forum/t/weird-idiom-labeling-values/1500/1 "2021-02-10T19:21:14Z")

</div>

I'm going through and changing a lot of FUNCTION uses to FUNC + LET. The long term goal will be to eliminate the locals-gathering functionality...and you either use LET/USE or you go explicit with `<local>` in the function spec.

I came across this:

```
    size-as-binary: enbin [be + 8] length of embedding
    append executable size-as-binary

```

This was the only use of the variable. Changing it to a LET works, but it's kind of a waste:

```
    let size-as-binary: enbin [be + 8] length of embedding
    append executable size-as-binary

```

LET's assignment form does run the right hand side...because the LET word itself vaporizes, so it's like the bound new SET-WORD! just runs as normal:

```
    append executable let size-as-binary: enbin [be + 8] length of embedding

```

But a LET isn't really necessary here. I had a weird thought, what if a TAG! or ISSUE! or something was used in a way that was "obviously" throwing it away?

```
    append executable (<size-as-binary> enbin [be + 8] length of embedding)

```

Maybe a little confusing. But it saves on a variable declaration.

A comment is zero overhead, so I'm doing that...

```
    append executable enbin [be + 8] length of embedding ; size of binary

```

But I just thought the idea of a deliberately discarded leading value was kind of interesting.

---

<div class="post-metadata">

**Author:** ![BlackATTR](https://revolt.metaeducation.com/forum/user_avatar/revolt.metaeducation.com/blackattr/32/204_2.png) [@BlackATTR](https://revolt.metaeducation.com/forum/u/BlackATTR)\
**Post date:** [February 10, 2021, 9:07pm UTC](https://revolt.metaeducation.com/forum/t/weird-idiom-labeling-values/1500/2 "2021-02-10T21:07:22Z")

</div>

I'm curious to know what others think about this.  
I prefer not to chain things in long, dense expressions. Makes it harder to read and debug later (or to add error-handling). Sometimes minimizing variable use is not a viable option.

It's worthy of some thought. In the example...

> [@hostilefork](#):
>
> `append executable (<size-as-binary> enbin...`

it seems like it would be additional complexity to distinguish/escape a \<tag\> or #issue that you want to keep in the APPEND expression.

---

<div class="post-metadata">

**Author:** ![hostilefork](https://revolt.metaeducation.com/forum/user_avatar/revolt.metaeducation.com/hostilefork/32/421_2.png) [@hostilefork](https://revolt.metaeducation.com/forum/u/hostilefork)\
**Post date:** [April 30, 2021, 5:08pm UTC](https://revolt.metaeducation.com/forum/t/weird-idiom-labeling-values/1500/3 "2021-04-30T17:08:00Z")

</div>

Rust has a weird convention where names that start with underscore are placeholders. This is to help avoid warnings about unused variables.

```
fn some_function(foo: String, bar: u32) {
   println("bar is {}", bar);
   // you get a warning that `foo` is unused
}

fn another_function(_foo: String, bar: u32) {
   println("bar is {}", bar);
   // no warning, because foo starts with underscore
}

```

It doesn't actually stop you from referring to the variable--it's a legal name. It just won't warn you when you don't use it.

We don't have analysis that does warnings :-/ but could use the same convention `_name`...since you can use `_` to opt out.

There's more possibilities of actually using a different type, to prevent the declaration of variables at all...

```
let name: "Eve"
for-each [#name score] ["Bob" 1020 Alice "304"] [
    ; don't actually create a variable for NAME, just a placeholder
    print [name] ; this would thus print "Eve"
]

```

How truly useful that would be, I don't know.
