Alternative forms in Softanza

17 views
Skip to first unread message

Mansour Ayouni

unread,
May 15, 2022, 5:06:45 PMMay 15
to The Ring Programming Language
Hello All,

In everyday language, humans have many ways to say the same thing. Softanza wants to capture most of them, so you can use any form without restrictions...

Unusually, there is a semantic difference that you want to emphasize by using a given form and not the other. For example:

? Q("    Sft   anza       ").RemoveSpaces()

Is the same as:
? Q("    Sft   anza       ").RemoveAllSpaces()

And they both give "Sftanza" as output.

But you may prefer to use the second one to make it explicit that all spaces are removed, including those in the middle, and not only those in the left and right of the string!

image.png
PS: This feature is also useful in providing you with the "Natural Coding" feature. We will present that later when we will deal with the "Practical Innovation" design goal.

Best,
Mansour

Mahmoud Fayed

unread,
May 15, 2022, 10:29:15 PMMay 15
to The Ring Programming Language
Hello Mansour

This example let me fell that the library is working like a Magic :D
This is wonderful but be careful while investing too much time to support many special cases
Don't try to do everything (This can't be done and could lead to infinite loop)
Ring developers could extend these classes uses inheritance and add more features 

Greetings,
Mahmoud

Mansour Ayouni

unread,
May 16, 2022, 6:15:14 AMMay 16
to Mahmoud Fayed, The Ring Programming Language
Hello Mahmoud,

Thank you for your precious advice!

Taken and well received.

Best regards,
Mansour

--

---
You received this message because you are subscribed to the Google Groups "The Ring Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ring-lang+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ring-lang/08c27e9b-fdc1-4229-96bd-8433ec08aea2n%40googlegroups.com.

Mahmoud Fayed

unread,
May 16, 2022, 9:51:49 PMMay 16
to The Ring Programming Language
Hello Mansour

>> "Thank you for your precious advice!"

You are welcome :D

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