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

May
3
answered Class Design — Multiple Calls from One Method or One Call from Multiple Methods?
May
3
comment Is it fair to reduce OOP to mere hierarchical composition of data structures?
@c69: I would say that inheritance and subtype polymorphism are a good way to define object-orientation (ie, if you are using these in your code then you code is object-oriented, regardless of language). However, I agree with you that "encapsulation" and (plain) "polymorphism" are generic terms and can apply to other things too.
May
3
comment The modern way to perform error handling…
Error codes can be easier to use if you have good forms of syntactic sugar or helper methods though, and in some languages you can make the compiler and type-system guarantee that you will never forget to handle an error code. As for the exception interface part, I think he was thinking about the notorious clunkyness of Java's checked exceptions. While they seem like a perfectly reasonable idea at first glance, they cause many painfull little problems in practice.
May
3
revised The modern way to perform error handling…
added 43 characters in body
May
3
revised The modern way to perform error handling…
added 31 characters in body
May
3
answered The modern way to perform error handling…
Apr
11
comment What's wrong with JavaScript
@scrwtp: You are right. I was thinking more about module-level encapsulation though (and the lack of a standard module system)
Mar
26
comment Is it better to learn the DOM or jQuery first?
I can imagine why one might shy away from a string-based DSL like sizzle but come on, the default DOM API is an exercise in pain that I would not wish on my worst enemy.
Mar
26
comment Will javascript be in the HTML5 standard
HTML5 is a really bad name. In the end it is more about standardizing common existing stuff from web browsers that were not in a standard yet. This ranges from the parsing algorithm for malformed HTML to Javascript APIs to things like video and so on.
Mar
26
comment if/else statements or exceptions
This argument is a common one but I find it hard to use as a good rule of thumb. IN the really tricky case its hard to decide whether something is "rare" or not.
Mar
26
answered Why to keep wrapping closure in each js-file if it can be added after concatenating?
Mar
13
comment Why are statements in many programming languages terminated by semicolons?
-1; Come on guys, have we all forgotten the hugely influential ALGOL? It had semicolons as statement separators before everything else you are mentioning. (I don't know if it took the idea from somewhere else though)
Feb
27
comment Coding Guideline : Methods shouldn't contain more than 7 statements?
I think the important rule of thumb is checking if the submethods are orthogonal. If they are independent, can be called in any order and respect the class invariant then its better to keep them separate. If the methods are tightly coupled, break class invariants and/or need to be called in a certain order then perhaps it is better to keep them together.
Feb
24
comment How can I translate ML code to F#?
@JonHarrop: Do you think the problem was only in doing the direct translation (due to the different module systems) or did you think there is something in the F# way of doing things that was getting in your way?
Feb
8
answered Is it a must for every programmer to learn regular expressions?
Feb
6
comment When stuck, how quickly should one resort to Stack Overflow?
I think this should probably habe been asked on SO's Meta.
Feb
4
answered Is there any reason why most programming languages don't have '!>' (not greater than) and '!<' (not less than) operators?
Jan
31
comment What are the features required for Object Orientation?
I have often heard this same definition but I have to confess that, as a language nerd, I detest it. Encapsulation is not unique to OO (ADTs came first) and many OO languages do encapsulation by convention. Inheritance is a nice feature but its not essential (composition often does the same job; interface inheritance doesn't really count). I do agree with the polymorphism bit but it saddens me that it is rarelly distinguished from other forms of polymorphism (like parametric polymorphism, aka generics). Thankfully, the wikipedia list that S.Lott brings up has most of my rant covered :)
Jan
31
comment What are the features required for Object Orientation?
Abstract Data Types, data modeling and encapsulation are not unique to OO, though (as you briefly mention yourself). I would prefer to describe OO based on its more unique features (dynamic binding of method calls, polymorphism via said method calls, etc)
Jan
31
comment What are the features required for Object Orientation?
I shall not today attempt further to define the kinds of material I understand to be embraced within that shorthand description ["object-oriented programming"]; and perhaps I could never succeed in intelligibly doing so. But I know it when I see it, and the code example involved in this case is not that.