Notations you didn’t even know you could use
Consider the following expression:
∃ c: s ¦ moisture (c) = soft
This is obviously mathematics. To express such a property in a programming language, you have to write a function containing a loop that iterates through the elements of s. Right?
Wrong. The above construct is valid Eiffel. It’s a consequence of recent syntax extensions that retain all the simplicity and consistency of the language but take full advantage of Unicode. Of course you do not have Unicode characters such as ∃
on you keyboard, but EiffelStudio’s completion mechanism inserts them for you.
To see how this works, just read Alexander Kogtenkov’s recent blog post on the topic.
Note added 24 December 2020: you will find a longer exposition in a later article on this blog.
How does the completion mechanism work? What do you have to start typing for completion of each symbol?
See the latest post.