3
Kaji
7y

Have to translate an API library from Ruby into PHP for work, and I swear it's all of the worst pieces of BASIC and Swift thrown together. To top it off, looking up a symbol chart for it to try and get a handle on the symbols they love to throw in front of variable and method names is useless because "symbol" is a freaking type in this language! Arrays are apparently called "hashes" now, and I can't quite tell if modules are supposed to be namespaces or classes yet...

If Ruby has redeeming qualities, I'm definitely open to hearing them. Right now I'm kind of feeling homesick for vanilla C, however...

Comments
  • 2
    Arrays are a type separate from hashes in Ruby. Hashes are key value pairs, Arrays are...arrays xp

    Classes, namespaces, and modules are 3 separate distinct things in Ruby. Everything in Ruby is an Object. Even classes (like user is an object but so is User) it gets weird looking at that hierarchy but overall, just know everything is an object.

    Redeeming qualities? I'm not really sure.

    If you like metaprogramming it gets pretty intense. It also has good higher order functions for an OOP language.

    I still prefer statically typed languages, although I hate vanilla C because pointers feel like an implementation detail of the 90s, not something I should concern myself with if I don't want to in my carefully architected apps.
Add Comment