13,193 reputation
63274
bio website lshift.net
location London, United Kingdom
age 39
visits member for 4 years, 2 months
seen 12 hours ago

Delphi/Objective-C/C#/Ruby/Scala programmer by day, Lisper/Smalltalker by night.


Dec
7
comment What's your strongest opinion against functional programming?
The necessity for monads in Haskell stems not from functional purity but from the fact that side effects and lazy evaluation are two great flavours that do NOT taste great together. Monads force sequential evaluation. (Really, they should be called Computation Builders or something. 'Monad' is a lousy name for anyone other than a category theorist.) And you can happily do FP without (knowingly using) monads!
Dec
7
comment Bug tracker that integrates with source control
My work does this with hg and git.
Dec
7
comment What's your strongest opinion against functional programming?
@MasonWheeler It was lack of decent multithreading (on FreeBSD), and lack of decent, well tested libraries (blog.reddit.com/2005/12/on-lisp.html). You can write Common Lisp code that runs faster than C, in certain situations. Speed is not the problem. Libraries are.
Nov
30
comment What are the pros and cons of multiple inheritance?
CLOS solves the diamond problem by forcing a deterministic topological sort on the superclasses and merging slots with the same name.
Nov
22
comment A programming language that does not allow IO. Haskell is not a pure language
@ThelronKnuckle, insulting the people of whom you're asking a question probably won't invite a warm reception. It's not about poor attention spans. It's about writing a question that doesn't waste the reader's time. Condense your question to its essence.
Nov
21
comment Are Get-Set methods a violation of Encapsulation?
@Caleb: I rather like it! I'm not trying to take a dogmatic Thou Shalt Not Use Getters/Setters - I'm suggesting that they're things one should use with caution.
Nov
21
comment Are Get-Set methods a violation of Encapsulation?
@Caleb: I know exactly what getters/setters are and do. You are taking an otherwise perfectly black box, and poking holes in it. There is no semantic difference between exposing a field and an autogenerated C# getter a la public int Foo {get; set;}. (There is an important difference in that the latter is mediated, controlled access which allows you to alter said control at a later stage without touching the callers. It's still access.)
Nov
21
comment Are Get-Set methods a violation of Encapsulation?
@StuperUser If that object needs to expose its state, then do so. But don't pretend that you're not exposing state just because you wrapped your field in a getter.
Nov
21
comment Are Get-Set methods a violation of Encapsulation?
@James: "Tell, don't ask." But my point is that getters are not a means of encapsulation, since they expose state.
Nov
21
comment Are Get-Set methods a violation of Encapsulation?
Getters provide access to an object's state. By definition they break encapsulation... albeit in a controlled/mediated manner. Setters are even worse.
Nov
14
comment What's the point of adding Unicode identifier support to various language implementations?
Do you mean names for things, or do you mean special characters like stars, lambdas and middle dots?
Oct
22
comment Why are weakly-typed languages still being actively developed?
"Strongly typed" is not a well defined term. Mostly it means "you cannot subvert the type system". It's orthogonal to what you describe above which might be latent versus manifest typing, or static versus dynamic typing.
Oct
11
comment Is hungarian notation a workaround for languages with insufficiently-expressive (i.e. Haskell-style) static typing?
@Péter Török: "I might think, though I'm not quite sure if I believe this or not, but Erlang might be the only object oriented language because the 3 tenets of object oriented programming are that it's based on message passing, that you have isolation between objects and have polymorphism." -- Joe Armstrong
Sep
27
comment Is there any reason lazy initialization couldn't be built into Java?
Thanks for the pointer to Alessandro's paper!
Sep
23
comment Is OOP hard because it is not natural?
@Donal Fellows: Indeed, hence the many "folksonomies" that arise. I wasn't talking about the real world, but about OOP, and when most people say "is-a" they mean inheritance, and it's well known (Cook, Cardelli, ...) that inheritance causes serious issues.
Sep
22
comment Is OOP hard because it is not natural?
By using a term like "hierarchical taxonomy", I think you're thinking of, well, inheritance. Inheritance is indeed hard to reason about. That's why people suggest using composition over inheritance.
Sep
14
comment Is there a language out there in which parameters are placed inside method name?
Brad Cox and Co. got this idea, unsurprisingly, from Smalltalk.
Sep
14
comment Suggest a good programming language to learn that is not OOP and definitely not in C style syntax
Knowing some ML helps enormously when reading the FP literature, and ML's been widely pillaged for concepts.
Sep
14
comment Suggest a good programming language to learn that is not OOP and definitely not in C style syntax
@SK-logic: although a judicious choice of languages leads one to naturally learn those paradigms and fundamental theories!
Sep
8
comment Is Java instanceof operator considered reflection, and what defines reflection?
Your first sentence is correct, and redundant in the face of previous answers. The rest is just wrong.