31 Matching Annotations
- Sep 2023
-
rubyreferences.github.io rubyreferences.github.io
-
A new class for containing value objects: it is somewhat similar to Struct (and reuses some of the implementation internally), but is intended to be immutable, and have more modern and cleaner API.
-
- Jun 2023
-
stackoverflow.com stackoverflow.com
-
you nailed it! A consumer should only be able to set an object's state at initialization (via the constructor). Once the object has come to life, it should be internally responsible for its own state lifecycle. Allowing consumers to affect the state adds unnecessary complexity and risk.
-
Making a property writable adds an order of magnitude in complexity. In the real world it's definitely not realistic for every class to be immutable, but if most of your classes are, it's remarkably easier to write bug-free code. I had that revelation once and I hope to help others have it.
-
- Dec 2022
-
-
对大量使用 immutable data structure 的语言,其 VM 和 GC 会有何特点?
Tags
Annotators
URL
-
- Nov 2021
-
www.reddit.com www.reddit.com
-
The reason is that all mainstream OS makers are moving towards a radical new paradigm for OSes called 'immutable' systems (apple recently completed this transition, ms failed twice and pins its hopes on win11, linux distros are held back by a requirement for lightweight container formats to gain a foothold first before decreasing mutability then switching to read-only system partitions).Immutability trended first for servers, where canonical gained some success early before pushing for snaps for desktop. Its a way to guarantee a system does not deviate from a 'know good' state and neither its reliability or hardware compatibility/certifications change across updates.
-
- Feb 2021
-
trailblazer.to trailblazer.to
-
Trailblazer will automatically create a new Context object around your custom input hash. You can write to that without interferring with the original context.
Tags
Annotators
URL
-
-
en.wikipedia.org en.wikipedia.org
-
Purely functional programming may also be defined by forbidding state changes and mutable data.
-
Purely functional data structures are persistent. Persistency is required for functional programming; without it, the same computation could return different results.
-
-
trailblazer.to trailblazer.to
-
ather, data is passed around from operation to operation, from step to step. We use OOP and inheritance solely for compile-time configuration. You define classes, steps, tracks and flows, inherit those, customize them using Ruby’s built-in mechanics, but this all happens at compile-time. At runtime, no structures are changed anymore, your code is executed dynamically but only the ctx (formerly options) and its objects are mutated. This massively improves the code quality and with it, the runtime stability
Tags
Annotators
URL
-
- Oct 2020
-
final-form.org final-form.org
-
Note: it does not mutate the object, but returns a new object.
-
-
github.com github.com
-
We could freeze the objects in the model but don't for efficiency. (The benefits of an immutable-equivalent data structure will be documented in vtree or blog post at some point)
first sighting: "immutable-equivalent data"
-
A VTree is designed to be equivalent to an immutable data structure. While it's not actually immutable, you can reuse the nodes in multiple places and the functions we have exposed that take VTrees as arguments never mutate the trees.
-
-
github.com github.com
-
We don't know if the passed in props is a user created object that can be mutated so we must always clone it once.
-
-
github.com github.com
-
When processors are exposed from a module (for example, unified itself) they should not be configured directly, as that would change their behavior for all module users. Those processors are frozen and they should be called to create a new processor before they are used.
Tags
Annotators
URL
-
-
-
Solid’s State primitive is arguably its most powerful and distinctive one. Through the use of proxies and explicit setters it gives the control of an immutable interface and the performance of a mutable one
-
-
-
We have to be careful not to mutate state so when we have some complex state like an object or an array we have to use some ugly tricks like in the setTodoCompleted function above.
-
-
svelte.dev svelte.dev
-
Note that interacting with these <input> elements will mutate the array. If you prefer to work with immutable data, you should avoid these bindings and use event handlers instead.
-
-
github.com github.com
-
use-methods is built on immer, which allows you to write your methods in an imperative, mutating style, even though the actual state managed behind the scenes is immutable.
Tags
Annotators
URL
-
- Sep 2020
-
medium.com medium.com
-
Svelte offers an immutable way — but it’s just a mask to hide “assignment”, because assignment triggers an update, but not immutability. So it’s enough to write todos=todos, after that Svelte triggers an update.
-
-
github.com github.com
-
you should take care not to mutate the passed in value
-
-
ramdajs.com ramdajs.com
-
We wanted a library designed specifically for a functional programming style, one that makes it easy to create functional pipelines, one that never mutates user data.
Tags
Annotators
URL
-
- Aug 2020
-
stackoverflow.blog stackoverflow.blog
-
Valhalla aims to revise the memory model for Java to allow for immutable types, which are more complex than primitives, but less flexible than objects. Sometimes you have more complex data that doesn’t change over the course of that object’s lifespan; burdening it with the overhead of a class is unnecessary. The initial proposal put it more succinctly: “Codes like a class, works like an int.” “For things like big data for machine learning or for natural language, Valhalla promises to represent data in a way that allows the JVM to fully take advantage of modern hardware architectures that have changed dramatically since Java was created,” said Saab.
-
- Sep 2019
-
codeburst.io codeburst.io
-
Keep the ergonomics of stable reference and directly mutable objects. In other words; be able to have a variable pointing to an object, and make subsequent reads or writes to it. Without needing to fear that you’re working with old data. While, in the background,..State is stored in an immutable, structurally shared tree.
-
- Aug 2019
-
github.com github.com
Tags
Annotators
URL
-
-
www.youtube.com www.youtube.com
-
.
Tags
Annotators
URL
-
- Jun 2019
-
hackernoon.com hackernoon.com
-
Stop telling your manager that blockchain will make information correct. It is a mechanism for detecting untruths, not a magical lie-detector.
Storing immutable proof of a crime on a blockchain isn't a good idea
-
-
-
immutability
why immutability is the most important feature of blockchains.
Also includes SHA256 basics
https://hackernoon.com/why-blockchain-immutability-matters-8ce86603914e
-
- Mar 2016
- Oct 2015
-
blog.mgechev.com blog.mgechev.com
-
Some interesting notes on combining Angular 1.x with immutable data structures for better performance.
-
-
jlongster.com jlongster.com
-
Great article on the state of immutable data structures in JS and using them with React and Redux
-