ziglings icon indicating copy to clipboard operation
ziglings copied to clipboard

007_strings2.zig - highlight to student that they must not use comments for multi line

Open falconmick opened this issue 3 years ago • 5 comments

As a developer who writes allot of // my brain didn't compute the idea of it being around the other way. I spent a good 10 min on this until I slowed down and actually read. Potentially not a PR worth merging but maybe?

falconmick avatar Jun 29 '22 14:06 falconmick

@falconmick Right, I see what you mean. My only concerns are:

  • Zig's exact error message may change.
  • I'm not sure "forward slash" would be universally understood (although that's what I call them too).

Do you think you could re-word it to mention an error without the exact wording and contrast the right and wrong character sequence ("\ instead of //")? Thanks!

P.S. Sorry it took so long to get back to you.

ratfactor avatar Jul 31 '22 13:07 ratfactor

Hey! When I get a chance I will have a go but even though English is my first and only language you'd sometimes find that hard to know!

falconmick avatar Jul 31 '22 16:07 falconmick

Maybe somthing along the lines of a if your having troubles try this kinda section at the bottom which could let the student know that sometimes people get their slashes around the wrong way.

falconmick avatar Jul 31 '22 16:07 falconmick

Yeah, maybe something like this at the bottom: "Still getting errors? Check your slashes. Remember that '\' are strings, '//' are comments."

Something like that.

If you update your commit, I'll be happy to merge.

ratfactor avatar Jul 31 '22 20:07 ratfactor

@falconmick Hey just checking in - would you still like to add the message to this exercise?

ratfactor avatar Sep 06 '22 12:09 ratfactor

I really don't think that's necessary, it destroys the exercise somewhat. If there are no further objections, we should close this PR.

chrboesch avatar Jan 08 '23 21:01 chrboesch

No problem cheers

falconmick avatar Jan 09 '23 02:01 falconmick