Isn't all this popularized in SQL? And (at least for me) written with a much clearer syntax.
In J it's i. <n>, like this - i. 5 produces 0 1 2 3 4 .
What do you want to use that list for?
There's some similarity, at a high level, with how they work. But it doesn't really make sense to say one is, overall, better than the other, because they don't solve the same problem. It's like saying a hammer is better than a screwdriver.
WITH RECURSIVE num AS (
SELECT 1 AS id
UNION ALL
SELECT id + 1 FROM num
)
SELECT * FROM num LIMIT 5;
SQL:1999 IIRC.