1,707 reputation
513
bio website inf.puc-rio.br/~hgualandi
location Brazil
age 24
visits member for 3 years, 7 months
seen Dec 22 at 10:57

Nov
11
awarded  Student
Nov
11
comment Is it OK to use dynamic typing to reduce the amount of variables in scope?
I'm not worried about reusing variables for performance. I'm worried about the bug risk of leaving variables (and values) in scope after they cease to be useful to me.
Nov
11
comment Is it OK to use dynamic typing to reduce the amount of variables in scope?
I edited the question in order to try to clear up my point. I don't think this is a strict duplicate of the "reuse variables" question since my main issue is scoping the variable. I also don't think the answer there is useful to me, since in both examples I gave the transformation function (open, new RegExp) is already refactored. Also for my purposes refactoring things in many methods is an orthogonal issue, since just adding extra blocks {} would do mostly the same thing, as far as scoping goes...
Nov
11
revised Is it OK to use dynamic typing to reduce the amount of variables in scope?
added 362 characters in body
Nov
11
asked Is it OK to use dynamic typing to reduce the amount of variables in scope?
Nov
11
comment Can a function be too short?
Tautological functions are fine for higher order code (although in this case you often use anonymous lambdas instead)
Nov
11
comment Why don't we store the syntax tree instead of the source code?
Tell this to the LISPers now...
Nov
10
revised Analyzing a programming language
deleted 11 characters in body
Nov
10
revised Analyzing a programming language
added 7 characters in body
Nov
10
answered Analyzing a programming language
Nov
9
comment Where did the notion of “one return only” come from?
From the last paragraph of "Goto Statement considered harmful": "in [2] Guiseppe Jacopini seems to have proved the (logical) superfluousness of the go to statement. The exercise to translate an arbitrary flow diagram more or less mechanically into a jump-less one, however, is not to be recommended. Then the resulting flow diagram cannot be expected to be more transparent than the original one."
Nov
9
comment Where did the notion of “one return only” come from?
I bet you must be one of those guys that also litters the code with boolean flags instead of using break and continue in loops.
Nov
5
comment Is it necessary to know and understand design patterns in order to be a professional programmer?
Some design patterns are pretty dependent on the language you use not obsoleting them :P
Oct
25
answered Should I teach my students alloca?
Oct
21
awarded  Critic
Oct
16
awarded  Commentator
Oct
16
comment Do exceptions basically exist to prevent a system from crashing?
Actually handling "abnormal" control flow is precisely when goto and its friend break are the most useful. The advantage of exceptions is that they can cross function boundaries and that the caller can determine where its most apropriate to catch it.
Oct
15
comment Why do languages such as C and C++ not have garbage collection, while Java does?
@steve314: Having witten the answer this thread is attached to, I already receive a notification for all comments. Doing an @-post in this case would be redundant and is not allowed by SE (don't ask me why though). (The real cause though is because my number is missing)
Oct
15
comment Why do languages such as C and C++ not have garbage collection, while Java does?
@Steve314: I'd love to see that if you ever remember where you found it!
Oct
15
revised What's wrong with JavaScript
added 2 characters in body