You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+17-24Lines changed: 17 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -719,57 +719,50 @@ if (domYaratildi(node)) {
719
719
```
720
720
**[⬆ en başa dön](#içindekiler)**
721
721
722
-
### Avoid conditionals
723
-
This seems like an impossible task. Upon first hearing this, most people say,
724
-
"how am I supposed to do anything without an `if` statement?" The answer is that
725
-
you can use polymorphism to achieve the same task in many cases. The second
726
-
question is usually, "well that's great but why would I want to do that?" The
727
-
answer is a previous clean code concept we learned: a function should only do
728
-
one thing. When you have classes and functions that have `if` statements, you
729
-
are telling your user that your function does more than one thing. Remember,
730
-
just do one thing.
722
+
### Koşullardan Kaçın
723
+
Bu imkansız bir iş gibi güzüküyor. Çoğu insan bunu ilk duyduğu ana kadar, " `if` ifadesi olmadan nasıl bir şey yapabilirim? " diyor. Bunun cevabı, birçok durumda aynı işi yapmak için polymorphism kullanabilirsiniz. Genellikle ikinci soru, "iyi güzel ama neden bunu yapmayı isteyeyim ki?" Bunun cevabı ise öğrendiğimiz önceki temiz kod konsepti olan: bir fonksiyon yalnızca bir şey yapmalıdır. `if` ifadesine sahip olan sınıflarınız ve fonksiyonlarınız olduğunda, kullanıcılarınıza fonksiyonunuzun birden fazla şey yaptığını söylüyorsunuz. Hatırla, sadece bir şey yap.
0 commit comments