Comments (7)
So how would you suggest changing the wording? It may be able to be improved.
I would say that most do not use it because they aren't solving problems where the last iterated value is not needed to be kept. Or because of the same reason that people don't tend to use 'or' and 'and' as opposed to ||
and &&
especially early on in their development as Rubyists.
I have noticed that as people become more experienced with Ruby they start to use each of these things as intended and where appropriate, because they do see the features and nuances given by each.
And though it can be the source of some weird bugs, I don't think it is the cause of those bugs. The cause is simply not keeping track of your variables.
from ruby.
ah yes i forgot to put my suggestion!
Perhaps pointing out the behavior of for..in
along with your comment:
And though it can be the source of some weird bugs, I don't think it is the cause of those bugs. The
cause is simply not keeping track of your variables.
would suffice. I suppose another good way is to make a concrete example. i.e.
x = 0
for x in 0..4
end
x #=> 4
vs.
x = 0
(0..4).each do |x|
end
x #=> 0
I argue the reason we don't use for..in
is it can change the state of our variables without us realizing it. It's not so obvious.
from ruby.
This is a really great distinction. The comment lives here: https://github.com/exercism/rikki/blob/master/comments/ruby/for_loop/for_loop.md
Do you want to take a stab at improving it?
from ruby.
ah you found my kryptonite: English! haha I'll take a stab sometime today, thanks for the link =)
from ruby.
LOL, I'm happy to tweak once you've given it a first pass :)
from ruby.
Closing, address in: exercism/DEPRECATED.rikki#8
from ruby.
Yepp, thanks! Also: deployed.
from ruby.
Related Issues (20)
- stock_for_item method in boutique Inventory challenge HOT 4
- `item_names` in Boutique Inventory challenge HOT 1
- Kindergarten Garden may be harder than defined HOT 4
- [SavingAccounts]: Suggestion: change negative interest rate tests to return positive value HOT 5
- Hacktoberfest 2022 HOT 2
- Binary Search Ruby HOT 3
- TwoBucket - possible error in test suite HOT 4
- Question about function name in "Moviegoer" exercism HOT 2
- Typo in final bird_count test where "whith" should be "with" HOT 2
- Typo in locomotive_engineer instrucions HOT 2
- Locomotive Engineer exercise relies on implicit Ruby behavior HOT 1
- the pythagorean triplet exercise has something wrong with it HOT 1
- Add analyzer for leap HOT 2
- Armstrong exercise tests confusion HOT 7
- 🤖 Sync error for commit 3312f6 HOT 1
- The Symbols document contains a factual error. HOT 2
- Building a training set of tags for ruby HOT 22
- Should the Attendee query methods end in a question mark? HOT 2
- Issue with savings_account interest_rate test HOT 2
- Parallel Letter Frequency times out in the web interface HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ruby.