Question

We all know there are some case sensitive languages, as well as case insensitive. Eiffel is a case insensitive one, according to the details I found. If a language is case insensitive, that means its keywords also case insensitive, right? But, in Eiffel, there is a small problem. Please have a look at the following link

http://docs.eiffel.com/book/method/eiffel-language-reserved-words#False

The above link contains the list of Eiffel keywords. Normally, if a language is case insensitive, all of the keywords are listed in lower case or uppercase in their web sites. However, in the above link, the keywords in 1.12, 1.23, etc are having cases. Which means, the keywords "True", "False", "TUPLE", "Void" etc are having both lowercase and uppercase letters.

So, does this mean Eiffel keywords are case sensitive? If the answer is No, then why they are listed such a manner?

Was it helpful?

Solution

It's just a question of style. In Eiffel, all class names are by convention written all uppercase. TUPLE is a class, so it is usually written all uppercase.

Keywords representing a value or a constant (True, False, Result, Current, Void, ...) have their first letter capitalized.

"Regular" keywords (and pretty much everything else) are all lowercase.

Eiffel is case insensitive, so you could write tuple, or Tuple, or TUPle, but it is poor style doing so. See this post for more on that matter: http://dev.eiffel.com/Style_Guidelines

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top