4 ms·
> I dislike all the magic of rails. This is my #2 problem with Ruby, and it's also the reason why a lot of folk love it. I think of macros in the same way I th
by aelzeiny 5y ago
> I dislike all the magic of rails.
This is my #2 problem with Ruby, and it's also the reason why a lot of folk love it. I think of macros in the same way I think of RegEx, if you're writing one you better hope it works perfectly because chances are that you'll be the only one to maintain it.
Other Ruby "features" that I dislike:
1. Blocks + Procs + Lambdas are all function-adjacent. Can't we just call them functions?
3. Out of bounds indexes on Arrays/Maps return nil.
4. method_missing() is super cool and super abusive. Again it feels like magic when functions come from nothing.
- tcoff91 5y agoRuby on Rails is awesome to write, horrible to maintain. It’s the fastest way to build a web app but good luck with staying productive once you have 100 engineers working on it and a million lines of rails soup to wrangle.
- hudon 5y agoGutHub, Shopify, Coinbase, Square, AirBnB, etc. , can probably answer some of your concerns.
- Toutouxc 5y ago> Blocks + Procs + Lambdas are all function-adjacent. Can't we just call them functions? Well, Ruby has functions, they're just called Procs. Lambdas are a special, more strict breed of Procs, and blocks are just (pretty complex) syntax sugar for passing a Proc to a method. The main function-like concept is always a Proc. > Out of bounds indexes on Arrays/Maps return nil. Calling the #[] or #slice method on an Array with an out-of bound index returns nil, calling the #fetch method raises an IndexError or returns an arbitrary default value. You can use whichever suits the situation.