Questions tagged [read-only]

4 questions
14
votes
3 answers

readonly vs. private getter-only property in C# 6

C# 6 added auto-property initializers and so we can do private List layouts1 { get; } = new List(); Is this better or worse than private readonly List layouts2 = new List(); (N.B. this is…
dumbledad
  • 317
  • 1
  • 2
  • 12
5
votes
1 answer

How is it possible to program using only immutable / "read-only" variables?

I believe there are languages where all names with associated values cannot have their associated values changed. An example would be a language where all names behave like a does in the following C code: int main(void) { const int a = 0; a =…
Jackson
  • 412
  • 3
  • 6
3
votes
0 answers

What is the DevOps term for 'read-only-deployment' pattern of a web application?

There is a lot of optimism around Blue-Green deployments, particularly from luminaries like Martin Fowler. The challenge with a financial services application, is that to make a blue-green deployment work, you have to guarantee that the old app…
hawkeye
  • 4,819
  • 3
  • 24
  • 35
0
votes
1 answer

How to show only most recent items in most efficient way?

Consider application where users rates products (e.g. 1-5 stars). Through passage of time, there might be millions of records. One can create desired indexes and/or keep sum and count of all ratings to easily get overall average score of particular…