Proposal: New "ends" keyword

I think the biggest thing here is that if you’ve made a mistake in how you’ve nested your code, this wouldn’t be able to catch it.

def call
  if x

  if y
  end
ends

In this example, you don’t know if I meant the if statements to be in the same level scope, or if I meant to have if y nested inside of the if x scope. I believe this would eventually lead to worse code as people could use it to be “lazy”, and just start skipping some thing.

4 Likes