StefanSalewski / NimProgrammingBook

Computer Programming with the Nim Programming Language -- A gentle Introduction
259 stars 19 forks source link

Grammar making purpose of the while loop clearer #11

Closed marek-lach closed 2 years ago

marek-lach commented 2 years ago

minor grammar fix.

StefanSalewski commented 2 years ago

Thanks for reporting.

Actually I have done some proofreading myself in the last 14 days, from the beginning of the book up to the section about the if statement. I am a bit tired now, but will try to apply your fixes soon.

Maybe you can check the section

http://ssalewski.de/nimprogramming.html#_blocks_scopes_visibility_locality_and_shadowing

which I wrote yesterday. That topic was a bit hard for my, so I am not sure if it is already good enough.

StefanSalewski commented 2 years ago

Fixed. But I had to ignore a few of your suggestions:

You can think of methods, as stating the action to be taken by a programming language.

That section was only for people familiar with OOP and Python, so I think this addition is not necessary. At least I think your addition will not help people unfamiliar with OOP.

Like most other programming languages, Nim has the concept of [.ndef]#code blocks#, or scopes.

I was not really sure that the last comma before " or" is that good. Scope is just a different word for "code block" here, it is both the same, not an enumeration.

if we want to check for the presence of a certain condition and

Sound wrong for me. My wording was

"if we want to check a condition and"

We may write instead "if we want to test a condition and" if you like that better. But generally this wording is what is used in computer programming books. The boolean condition is always there, so writing "the presence of" makes not much sense.