In Ring 1.25 (GitHub) - Using Keywords as Identifiers

48 views
Skip to first unread message

Mahmoud Fayed

unread,
Dec 9, 2025, 2:58:44 AM (10 days ago) Dec 9
to The Ring Programming Language
Hello

This is one of the new features provided by Ring 1.25 (under development)

The next keywords could be used as variables/attributes/etc.

This is useful when creating domain-specific languages that uses these keywords in the commands.

  • Again

  • But

  • Case

  • Catch

  • Done

  • Else

  • From

  • In

  • Off

  • Ok

  • On

  • Other

  • Step

  • To

Example:

new Love { I will say it Again and Again YOU ARE MY LOVE Come with me To the Sky } class Love To Again func getTo ? "Where?" func getAgain ? "Really?" return True func braceError

Output:

Really? Really? Where?

Greetings,
Mahmoud
Reply all
Reply to author
Forward
0 new messages