New answers tagged comparative-review
5
votes
Implementing a --assume-yes/--assume-no command line flag to affect a `input()` based `confirm()` function
Don't assign to args within the __main__ guard - it's still global; it needs to be moved to a function.
...
6
votes
Implementing a --assume-yes/--assume-no command line flag to affect a `input()` based `confirm()` function
Of the three approaches, the first seems best to me. We can do a little better by giving names to the the "assume" versions of the function, and include them in ...
3
votes
Comparison of Named parameters and the Java Builder pattern in C++
Named parameters are less extensible
The named parameters approach looks nice, as it is a language feature. However, it requires C++20, only works on aggregates, and if you ever want to add more ...
0
votes
maxlist(L, M) that succeeds if M is the max number in the list L
If you change the first clause to maxlist2([N], N) :- !., the extra choice point disappears. Your implementation does not recognize the fact that the two clauses ...
Top 50 recent answers are included
Related Tags
comparative-review × 935python × 178
java × 170
performance × 148
c# × 146
javascript × 108
c++ × 83
algorithm × 65
strings × 65
beginner × 62
programming-challenge × 57
php × 54
python-3.x × 53
object-oriented × 53
c × 44
functional-programming × 31
array × 26
ruby × 23
interview-questions × 19
error-handling × 18
complexity × 18
unit-testing × 17
haskell × 16
datetime × 16
hash-map × 16