Comment

Comment by torben-friis

list.filter is ok! Filtering is an action that applies to a list

false.not is borderline but if read as false.negate it makes sense (negating is an action that applies to a Boolean value). That wording screws the chaining though.

5.times is where the pattern breaks: times is not an action that applies to a number (nor an action at all). It’s the block the one that should repeat/iterate - but Ruby breaks the rule there and blocks are not an object (!). If they were you could block.repeat(5) which IMO is cleaner.

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton