12,609 reputation
11747
bio website
location
age
visits member for 2 years, 11 months
seen 3 hours ago

Oct
22
comment Why do programming languages allow shadowing/hiding of variables and functions?
While formally the IEnumerable<T>.GetEnumerator() hides the IEnumerable.GetEnumerator(), this is only because C# does not have covariant return types when overriding. Logically it is an override, fully in line with LSP. Hiding is when you have local variable map in function in file that does using namespace std (in C++).
Oct
22
comment Why do programming languages allow shadowing/hiding of variables and functions?
@Giorgio: Would you make your comment into an answer? It seems to be the only really relevant point around.
Oct
22
comment Why do programming languages allow shadowing/hiding of variables and functions?
Overriding is not hiding. I don't agree with @Phil that this addresses the question.
Oct
18
comment Macro vs. Static functions in Header
I would actually suspect most of these are historical reasons. Ages ago, the C compilers didn't inline functions at all. So people used macros for things they wanted inlined. C code is usually unusually long-lived.
Oct
18
answered TotalPhase Aardvark driver's GPL license
Oct
16
comment How to maintain a forked git repo with feature branches that upstream won't pull?
@alexgray: That's why I am not writing it as answer, but as comment.
Oct
16
comment How to maintain a forked git repo with feature branches that upstream won't pull?
Gratuitous changes to formatting are not going to be accepted to any single project I've ever heard of and if you insist on keeping them in your repository, welcome to your little personal well deserved merging hell. If you just cleaned up warnings, most probably it would be accepted, though you might still be asked to send it split to reasonably sized chunks. Even changes to make formatting self-consistent might be accepted. But changes that change formatting to different one never are. Because everybody else is used to the current formatting and because it will cause problems with merging.
Oct
16
revised Strategy for code review before merge to master from feature branches
minor grammar nit
Oct
16
comment Strategy for code review before merge to master from feature branches
@michipili: I understand it. But a random beginner looking for guidance won't. Please, clarify it in the answer itself.
Oct
15
comment Strategy for code review before merge to master from feature branches
@stijn: --no-ff has it's up and downsides. I personally find it more noise than anything. YMMV.
Oct
15
revised Strategy for code review before merge to master from feature branches
more about how it works in Linux
Oct
15
revised Strategy for code review before merge to master from feature branches
added 552 characters in body
Oct
15
comment Strategy for code review before merge to master from feature branches
The revisions exist and are pointed to by reflog entries. But as branches there is just one, topic. Because branch in git is just the name.
Oct
15
comment Strategy for code review before merge to master from feature branches
There should be no topic-0, topic-1 and topic-2 branches. The second the rebase is complete, the previous version is irrelevant. So all there would be is topic@{1}, topic@{2}, topic@{yesterday}, topic@{3.days.ago} etc. to save your butt in case you find you screwed conflict resolution in the rebase.
Oct
15
answered Strategy for code review before merge to master from feature branches
Oct
15
comment Is garbage collection necessary?
@RichardJ.RossIII: Reference counting is generally the slowest memory management technique. There is simply so many reference and unreference operations that it gets really noticeable. If done manually, you can often optimize many of those operations away, but the compiler usually can't.
Oct
14
comment Why doesn't Git daemon start in the background?
Running with & won't work, because such process will still receive hangups from the terminal.
Oct
10
comment Etiquette for editing someone's pull request
Remember that git distinguishes "author" and "committer". So when you rewrite their commits to only contain what you actually want, they will still be considered authors. And you the committer.
Oct
10
answered How do the blogging sites or sites that host prose like contents store the data?
Oct
9
comment Python decorators and Lisp macros
@delnan: Technically, lisp is not modifying it either; it is using it as source to generate a new one and so would python, yes. The problem lies in the absence of token list or AST and the fact the compiler already complained about some things that you might otherwise allow in the macro.