3 ms·
> No eval: eval, instance_eval, class_eval > No metaprogramming: send, method_missing, define_method (dynamic) > No threads: Thread, Mutex (Fiber is supported
by throwaway041207 6mo ago
> No eval: eval, instance_eval, class_eval
> No metaprogramming: send, method_missing, define_method (dynamic)
> No threads: Thread, Mutex (Fiber is supported)
Speaking as someone who has written a lot of Ruby code over the years, utilizing every single one of these features of Ruby, I have to say this is the version of Ruby I've evolved to want: simpler and easier to understand but with the aesthetic beauty of Ruby intact.
IMO this more limited variant of Ruby is more practical now that we have extremely productive code generation tools in the form of LLMs. A lot of meta-programming ostensibly exists to make developers more productive by reducing the amount of boilerplate code that has to be written, but that seems no longer necessary now that developers aren't writing code.
- satvikpendem 6mo agoWhat about Crystal? If it's just the aesthetic beauty you want then it might be a good fit as it's similar syntax yet statically typed which leads into more efficient compiled code.
- drzaiusx11 6mo agoRequiring static type annotations is likely a dealbreaker for many. I wish Matz had gone the route of python3 and allowed _optional_ inline type annotations instead of the mess that is RBS.
- throwaway041207 6mo agoCrystal is great and I think it nailed statically typing in a Ruby like language, but I've always been wary of day job use of the language because it doesn't have a significant user base.
- satvikpendem 6mo agoI agree, it's a network effect problem and I wouldn't use it for professional use, only personal.
- jimbokun 6mo agoThis subset of Ruby doesn’t either.
- throwaway041207 6mo agoIf this stabilizes and gets networking support, there are definitely projects that I'll be able to use this for, and the buy-in will be easier than proposing Crystal.
- drzaiusx11 6mo agoI'd agree that lack of eval is "for the best", but lacking threads and mutexes isn't. Lack of define_method makes a lot of sense as well given the use case. However, send/method_missing is in common use in preexisting libraries and it shouldn't be particularly difficult to implement (via in memory lookup tables at "compile" (to c) time etc), so either they're ommitted for the reasons you say, or he just hasn't gotten around to it yet. I'm hoping the latter, but only for compatibility sake as I won't be able to use it for any real work at least in the short term otherwise.
- jimbokun 6mo agoThe benefit of meta programming was never having less code to write. It was having less code to read.