# Beginner's question: why is this happening?

**URL:** <https://swi-prolog.discourse.group/t/beginners-question-why-is-this-happening/4309>\
**Category:** Help!\
**Created:** [August 18, 2021, 12:01pm UTC](https://swi-prolog.discourse.group/t/beginners-question-why-is-this-happening/4309 "2021-08-18T12:01:14Z")\
**Posts on this page:** 2\
**Page:** 2

<div class="post-metadata">

**Author:** ![davidkettle](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/davidkettle/32/3669_2.png) [@davidkettle](https://swi-prolog.discourse.group/u/davidkettle)\
**Post date:** [August 20, 2021, 6:37pm UTC](https://swi-prolog.discourse.group/t/beginners-question-why-is-this-happening/4309/23 "2021-08-20T18:37:19Z")

</div>

OK, maybe not. But what about List and Scheme (if you consider them major languages)?

Anyway, I guess I was deceived into thinking hyphens were OK because I didn’t get an error message.

---

<div class="post-metadata">

**Author:** ![peter.ludemann](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/peter.ludemann/32/48_2.png) [@peter.ludemann](https://swi-prolog.discourse.group/u/peter.ludemann)\
**Post date:** [August 21, 2021, 9:13pm UTC](https://swi-prolog.discourse.group/t/beginners-question-why-is-this-happening/4309/24 "2021-08-21T21:13:06Z")

</div>

> [@davidkettle](#):
>
> But what about List and Scheme (if you consider them major languages)?

Programming language trivia question – what do COBOL and LISP have in common? (Ans: both allow hyphens in variable names)

> [@davidkettle](#):
>
> Anyway, I guess I was deceived into thinking hyphens were OK because I didn’t get an error message.

Technically, you did nothing wrong. There are a few “style” warnings, the most common being for [singleton variables](https://www.swi-prolog.org/pldoc/man?section=singleton). There’s also check/0, which will look for other potential errors. But as far as I know, using “-” instead of “\_” isn’t checked.

[Previous page](https://swi-prolog.discourse.group/t/beginners-question-why-is-this-happening/4309.md?page=1)
