Writablilty VS Readablility VS Both of them!

20 views
Skip to first unread message

Mansour Ayouni

unread,
Oct 11, 2022, 3:54:49 PM10/11/22
to The Ring Programming Language
Hello All,

Softanza coding style is designed with a double promise in mind:
  • Your code is WRITABLE, hence easy to you while you're crafting it
  • As well as READABLE, hence easy for your reader to understand it without a hassle!
I'll explain this in action.

Let's have a list, and then take two items in order to swipe them:
o1 = new stzList([ "C", "B", "A" ])

You can quickly write:
o1.Swipe(1, 3)
? o1.Content() #--> ["A", "B", "C"]

And you are done! Which means literally: "swipe items at positions 1 and 3".

The point is that Softanza talks in near natural language tongue, and the sentence above can be written as-is in plain Ring code:
o1.SwipeItems( :AtPositions = 1, :And = 3)
Kind of What You Think Is What You Get :)

Let's recapitulate:
  • WRITABILITY: you quickly write a function, always in a short form, without complications, because you need to be focused on how to solve # the case in hand and not in beautifying your code with any syntactic sugar!
  • READABILITY : Others, or yourself in the future, can read the function and understand the intent of its writer without referring to any external documentation).
And in Softanza, you have them both...
image.png

Best regards,
Mansour

Mansour Ayouni

unread,
Oct 12, 2022, 6:55:24 AM10/12/22
to The Ring Programming Language
Sorry!
Please replace every "swipe" with "swap".

Best,
Mansour
Reply all
Reply to author
Forward
0 new messages