Indexing From Zero: Part 3

Indexing From Zero: Part 3

As usual, you can find the transcript below (or you can click the image above):

I thought you were asking for comments, so I commented. I think the view that substring in Java has a “quirk” because uses the [a, b[ convention for intervals is questionable.

That “semi-open interval” is in my opinion the correct approach (may be on par or second only to a start/size approach). A “boundary included” [a, b] would instead be worse for many reasons.

Java has no “quirk” here: it’s the correct thing to do (and please note that I’m surely NOT a Java fan, at all).

It’s moments like these where I have to ask myself: how did I get here? It’s like talking to a brick wall.


If you came from the Wall of Shame, here are links to the previous and next comments. Also, here’s a link back to the Wall of Shame.

Jeremy Grifski

Jeremy grew up in a small town where he enjoyed playing soccer and video games, practicing taekwondo, and trading Pokémon cards. Once out of the nest, he pursued a Bachelors in Computer Engineering with a minor in Game Design. After college, he spent about two years writing software for a major engineering company. Then, he earned a master's in Computer Science and Engineering. Today, he pursues a PhD in Engineering Education in order to ultimately land a teaching gig. In his spare time, Jeremy enjoys spending time with his wife and kid, playing Overwatch 2, Lethal Company, and Baldur's Gate 3, reading manga, watching Penguins hockey, and traveling the world.

Recent Content