Skip to main content

Questions tagged [out-parameters]

4 votes
2 answers
3k views

I have some incoming request - it's an instance of class generated from api specification - POJO with public getters/setters. I would like to normalize some values. For example dimensions (to use ...
Shaolin's user avatar
  • 43
35 votes
9 answers
51k views

I find myself often looking up questions online, and many solutions include dictionaries. However, whenever I try to implement them, I get this horrible reek in my code. For example every time I want ...
Adam B's user avatar
  • 1,660
15 votes
3 answers
11k views

In Other C++ Features, Reference Arguments of the Google C++ Style Guide, I read that non-const references must not be used. All parameters passed by reference must be labeled const. It is clear ...
Wolf's user avatar
  • 640
0 votes
5 answers
4k views

Which code is better: // C++ void handle_message(...some input parameters..., bool& wasHandled) void set_some_value(int newValue, int* oldValue = nullptr) // C# void handle_message(...some ...
Abyx's user avatar
  • 1,445
8 votes
4 answers
12k views

We have a function that modifies a JS object, by adding some custom properties to it. The function doesn't return antyhing addTransaction: function (obj) { obj.transactionId = this....
Ruan Mendes's user avatar
6 votes
4 answers
22k views

I happened to create a mutable class like this: class Mutable<T> { private T value; public Mutable() { this.value = null; } public Mutable(T value) { this.value = value; } T get(...
hyde's user avatar
  • 3,764