4

I'm reading the book The Secret Life of Programs by Jonathan E. Steinhart. In it, he mentions in passing:

many consider the handling of whitespace in Ruby to be a replay of of a mistake in the original C language that was fixed long ago

What mistake is that?

tsvallender
  • 255
  • 3
  • Could be referring to [this](https://stackoverflow.com/q/37796947/102937), or maybe [this](https://stackoverflow.com/a/58294646/102937). – Robert Harvey Jun 27 '23 at 19:55

1 Answers1

2

For what it's worth here's the full paragraph you quoted from:

Creating new languages is fun. Of course, people started making new languages without understanding their history and reintroduced old mistakes. For example, many consider the handling of whitespace (the spaces between words) in the Ruby language to be a replay of a mistake in the original C language that was fixed long ago. (Note that one of the classic ways to deal with a mistake is to call it a feature.)

The Secret Life of Programs by Jonathan E. Steinhart page 228

Which still leaves room for interpretation. So for an authoritative answer you'd have to ask Steinhart. To me this reads like Steinhart just doesn't like languages that ignore whitespace, which C and Ruby do. Others like Python don't, thus fixing the "mistake".

It's easier to read it this way when you know this about those languages off the top of your head. Authors who do can forget that not everyone does.

That's my guess. But I'm not Steinhart. So for all I know this refers to some weird whitespace handling bug that showed up in C, was fixed in C, and then showed up in Ruby. If that's what this is, it's really annoying that the bug isn't specifically called out. Since the text isn't clear you'd have to ask the author.

candied_orange
  • 102,279
  • 24
  • 197
  • 315
  • 1
    "...many consider..." -- *citation needed.* – Robert Harvey Jun 27 '23 at 20:13
  • 3
    @RobertHarvey Is it? That's something you'll have to take up with Steinhart, OP is merely quoting him. (In any case, it's pretty clear: it's not hard to find users of Python, Go, etc. who like the strictness around whitespace) – Alexander Jun 27 '23 at 21:42
  • 5
    Languages that uses indentation for scoping predate C by 6 years. Languages that don't predate C by 20 years. It doesn't make sense to me that the author would be referring to that specific feature by the example of that specific language. – Jörg W Mittag Jun 28 '23 at 06:20