Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Ruby the OOP language!
#2
Right Ward Assignment of Variables

Here you can take a look at an experimental feature that they might add to Ruby 2.8 alias version 3.0 that has not frozen its list of new features and improvements.
https://blog.saeloun.com/2020/08/31/ruby...nment.html

Here are two examples of how the code looks like right now till Ruby 2.7 and how it will be in 2.8.

Code:
first, second = [1, 2]
[1, 2] => first, second

The classic assignment looks fine but it is not natural according to the writer. The latter actually lets you read it the same way you would describe it to a friend that knows no Ruby at all.

As the article says, it might not be implemented if there's lack of interest or it looks lame. Even so take in consideration that there are other programming languages that already offer this features like R (for scientific databases?) and TI-BASIC.

So what do you think about it, guys? Happy with a sweat
"For God has not destined us for wrath, but for obtaining salvation through our Lord Jesus Christ," 1 Thessalonians 5:9

Maranatha!

The Internet might be either your friend or enemy. It just depends on whether or not she has a bad hair day.

[Image: SP1-Scripter.png]
[Image: SP1-Writer.png]
[Image: SP1-Poet.png]
[Image: SP1-PixelArtist.png]
[Image: SP1-Reporter.png]

My Original Stories (available in English and Spanish)

List of Compiled Binary Executables I have published...
HiddenChest & Roole

Give me a free copy of your completed game if you include at least 3 of my scripts! Laughing + Tongue sticking out

Just some scripts I've already published on the board...
KyoGemBoost XP VX & ACE, RandomEnkounters XP, KSkillShop XP, Kolloseum States XP, KEvents XP, KScenario XP & Gosu, KyoPrizeShop XP Mangostan, Kuests XP, KyoDiscounts XP VX, ACE & MV, KChest XP VX & ACE 2016, KTelePort XP, KSkillMax XP & VX & ACE, Gem Roulette XP VX & VX Ace, KRespawnPoint XP, VX & VX Ace, GiveAway XP VX & ACE, Klearance XP VX & ACE, KUnits XP VX, ACE & Gosu 2017, KLevel XP, KRumors XP & ACE, KMonsterPals XP VX & ACE, KStatsRefill XP VX & ACE, KLotto XP VX & ACE, KItemDesc XP & VX, KPocket XP & VX, OpenChest XP VX & ACE
Reply }


Messages In This Thread
Ruby the OOP language! - by kyonides - 12-28-2018, 02:28 AM
RE: Ruby the OOP language! - by kyonides - 09-04-2020, 04:57 AM
RE: Ruby the OOP language! - by DerVVulfman - 09-04-2020, 05:14 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
   Learning Ruby is fun! amp 2 4,463 07-07-2010, 09:27 AM
Last Post: jubhub731



Users browsing this thread: