Remix.run Logo
petalmind 6 hours ago

> on the 'reflection' level, where most languages have specific keywords that cannot be used 'first class' with the rest of the language.

In Ruby this is also the other way around, and it's one of my pet peeves.

`Kernel#callcc` looks like a method (arguably, of a special class), yet it's impossible to re-implement directly in the language, as far as I can tell.

Same with `raise`, I keep forgetting that it's not a keyword even.

decasia 6 hours ago | parent [-]

Yeah, I just discovered this and was also amazed.

https://decasia.org/tech/2026/02/raise-not-a-reserved-word.h...

This being said, I don't think there is any requirement technically that every core method can also be re-implemented in Ruby... There are so many methods that are just thin interfaces to something written in C, whether because they are touching VM internals, or for perf reasons, or because they make system calls or call external libraries.

petalmind 6 hours ago | parent [-]

You reimplement `while` in terms of `loop`, but do you know that `loop` is also a method :)