Meetup PR was auto-closed

1 Like

What does this PR accomplish?

What would be it’s impact on all the existing solutions?

What does this PR accomplish?

The PR uses standard library classes instead of redefining the wheel, thus, simplifying the code.

What would be it’s impact on all the existing solutions?

Since there’s a change in the method signature, the solutions that have already been submitted will need to be recompiled.

Recompiled or rewritten? This looks like it would render all completed solutions incorrect.

Recompiled or rewritten?

Recompiled, for sure. I’m not sure how much rewriting would be required, since it entirely depends on the code. My solution, for example, immediately converts the given integer into a DayOfWeek, so the PR would actually reduce my LOC. Solutions that use the int value could be fixed with a single line change dayOfWeek.getValue.

In any case, I assume no more than a couple of lines change at most should work for most solutions.

The point is that if any changes are required, then solutions which previously worked perfectly will stop working. That’s a pretty high cost and should only be incurred if there is a very compelling reason to do so.

I don’t believe any improvement should be impeded because of a solution submitted years ago, otherwise, there never will be any improvements.

That said, I’ve provided reasonable explanation for the PR to exist, and at this time, I’ll leave it to the maintainers to decide whether or not to accept it.

1 Like

Hi colleagues, I solved this exercise today and I had the same thoughts as our colleague @bruce-wayne. The Scala language doesn’t have its own data time library and fully relies on Java data time classes.

So it is logical to align the current Scala exercise with the similar one on the Java track. The method signature should use DayOfWeek as in the Java exercise. It should affect all existing solutions submitted to the site. However, it requires adding or removing one line of code. So the changes are minimal, but they will make the exercises and solutions more idiomatic and force the students to learn and use the existing powerful date/time classes.

@IsaacG I saw from time to time that some exercises updated and my solutions are outdated. I had reviewed the proposed PR. It seems logical and fine for me. May we reconsider it?

1 Like

That’s something the track maintainer would need to weigh in on. I’m not a maintainer for the Scala track.