6

I have answered a question recently about default return type in VBA.

Please note I don't consider this as a case of revenge, just want to discuss whether the way I worded my answer needs revision.

I have received 2 downvotes and I am starting to think maybe there is something wrong with it...

I find this pretty clear:

If a type is not specified explicitly then Variant is the default.

but to me, another answer explicitly directs the compiler to change the default behaviour. If am not mistaken here I almost feel that the second part of the other answer is off-topic for the question as it touches on something completely different.

It's like "yeah cool to know, good tip - definitely" but it's almost like "yeah, in C# the default behaviour of =+ is i = i + 1 but hey you can overload the operator and make the default =+ act like something else".

Now, I am a but confused due to the downvotes because normally you do not receive a downvote on a good answer ( an answer that actually does answer the question ) but this case is different as you can see which is why I seek some clarity.

Even the OP indicated that my answer was exactly what he was looking for:

enter image description here

Should I reword my answer? If so, what is your suggestion? If not, please point out where I am going wrong on this one. I am open to criticism.

ps. I have been trying to discuss this on a chat but the response from other users was that they are not very familiar with VBA

0

1 Answer 1

9

You're just nit-picking on the subtlety of the word "default", in the context of the what the settings affect.

I sounds like, by default, without anything else, the default type is indeed Variant. However, using DefInt I allows you to specify a default setting for any function starting with I.

Essentially, there is a global default behaviour, but you can also set a partial default behaviour.

While both your answers are technically correct, the other one seems technically better, since that detail is certainly relevant for anyone reading this question. (The most useful meaning we can read from the question being "what do I get when I don't specify anything in the function declaration?".)

I personally wouldn't downvote your answer, and I don't mind it staying at all, especially because you too have additional details, but I wouldn't panic or feel offended for a couple of downvotes.

It looks like you've made 15+k rep in a bit more than a year (which is rather good), perhaps it's time to learn to take rep with a pinch of salt :-). I understand it can be frustrating, but since your answer sill has a positive score overall, there seems little point stressing about it.

1
  • Having answered a number of Java/SSL questions, I've always had a similar problem with "default" when it comes to SSLContext: there is a "default default" value if you don't do anything at all, but you can also use setDefault to change the default value, which then can always be overridden when you do choose to specify a context for a specific socket. It can be confusing, but it's often better to say a bit more to clarify.
    – Bruno
    Commented Jul 9, 2014 at 10:38

You must log in to answer this question.