109 reputation
3
bio website
location
age
visits member for 4 years
seen Mar 18 at 2:51

Sep
26
comment Ordered enumeration: IEnumerable or Array (in C#)?
@StevenJeuris Your question wouldn't be necessary if C# were properly designed and had an ISortedCollection<T> interface, which you would extend if you needed the collection to be sorted. But since it doesn't, the only way to prevent misuse at compile time is to either extend an overly narrow type (IList<T>) or to extend IEnumerable<T> and do an unnecessary sort.
Aug
30
comment Why is DRY important?
"Strongly depends if doStuffX depends on each other or not." -- DRY has nothing to do with whether they depend on each other, but rather whether they duplicate decisions.
Aug
30
comment Why is DRY important?
That you said nothing about the relationship between a, b, c, d suggests that you don't understand enough about DRY to ask a meaningful question about it. The only thing repeated here is function doStuff { }, but DRY is not at all about repetition of syntax, it's about the repetition of policy and method.
Mar
27
comment Time to drop Emacs and vi?
"working using Vim / emacs forces you to understand at least a bit of a platform / language before using it. Many IDEs allow you to operate in a language without knowing what's going on; so using Vim / emacs will force yourself to gain some insight in what you're really doing." -- This is absolute rubbish. It's as if you don't even know what programming languages and editors are.
Mar
27
comment Time to drop Emacs and vi?
"If I recall correctly" -- you don't.
Mar
27
comment Time to drop Emacs and vi?
This isn't an answer to the question or anything close to one.
Mar
27
comment Time to drop Emacs and vi?
This question as asked is deeply unintelligent. The assertion that we have better alternatives is immediately shown to be baseless by "at least I hope we do" and everything else that follows. The notion that something should be dropped before inventing an alternative is grossly irrational, as is the notion that one can just "look for something new" as if great text editors can be found by digging in the ground, or something. I find it bizarre that such idiocy has been turned into a Community wiki -- what purpose does it serve other than an example of how not to ask a question?
Oct
7
comment How far should 'var' and null coalescing operator '??' be entertained without hampering readability?
@SargeBorsch Stupid strawman. I didn't say that some idiot doing something by rote would thereby be competent.
May
20
comment Does auto make C++ code harder to understand?
"I had to check the return type of the right side" -- There's no need to know the types of things, just what they represent, which is best done through good names.
May
10
comment Where did the notion of “one return only” come from?
" you basically have three options" -- Wrong. I use this: ftype f() { resource res = acquire_resource(); ftype ret = f_inner(res); release_resource(res); return ret; } ... then f_inner can do all the returning it wants.
May
10
comment How far should 'var' and null coalescing operator '??' be entertained without hampering readability?
"is just lazy" -- This isn't an argument against it. In fact, it isn't at all intelligent.
May
10
comment How far should 'var' and null coalescing operator '??' be entertained without hampering readability?
Someone with a poor sense of abstraction.
May
10
comment How far should 'var' and null coalescing operator '??' be entertained without hampering readability?
Using var is a sign of programmer competence, avoiding it is a sign of programmer incompetence. Program in SCALA or Haskell and you'll learn what good programming is.
May
24
comment Why are null references shunned while throwing exceptions is considered okay?
"In haskell there is no such thing as an uninitialized variable" -- Yes, I said that explicitly in another comment here, and implied it in my comment above. "which brings with it all the same problems" -- not if one properly uses Haskell idioms.
May
24
comment Why are null references shunned while throwing exceptions is considered okay?
Wrong, they serve the same purpose: a nullable variable of type T has one of two values, null or t, whereas an Optional<T> has one of two values, Missing or Present(t); a binary decision can be made for either, but for an Optional, since the value is a valid object in both cases, a method of Optional can be called regardless of the value (Present or Missing, which are both subclasses of Optional). For examples of how this sort of thing can be used in Scala, see blog.tmorris.net/scalaoption-cheat-sheet
May
24
comment Why are null references shunned while throwing exceptions is considered okay?
I've explained the practical difference with an Uninitialized class twice -- it identifies the origin of the null item -- making it possible to pinpoint the bug when a dereference of null occurs. As for the languages designed around null-less paradigms, they avoid the problem from the get-go -- they provide alternate ways to program.that avoid uninitialized variables; that may seem hard to grasp if you aren't familiar with them. Structured programming, which also avoids a large class of bugs, was also once considered "academic".
May
24
awarded  Teacher
May
23
comment Why are null references shunned while throwing exceptions is considered okay?
I already answered this, in two different ways: a) "If one of these ever shows up, you know what happened" -- if you encounter one of these, you have details as to what didn't get set, rather than the uninformative raw null value. a) "there are some very tricky issues about initializing recursive structures, but work is being done on it" -- it is possible to write arbitrarily complex programs with no uninitialized variables. Consider every program ever written in Haskell or any other pure functional language -- variables never change their values, so "uninitialized" is meaningless.
May
23
comment Why are null references shunned while throwing exceptions is considered okay?
But your question was not about uninitialized variables. And there are languages that do not use null for uninitialized variables, but instead use wrapper objects that can optionally contain a value -- Scala and Haskell, for example.
May
23
comment Why are null references shunned while throwing exceptions is considered okay?
I am advocating no nulls -- along with Tony Hoare, who invented null pointers in the first place, and a lot of other people who have given careful consideration to the issue. I recently read a thesis defining a variant of Java that does not contain nulls at all -- there are some very tricky issues about initializing recursive structures, but work is being done on it.