#Immutability
Explore tagged Tumblr posts
Quote
Such is the immutability of truth, the patrons of it make it not greater, the opposers make it not less; as the splendour of the sun is not enlarged by them that bless it, nor eclipsed by them that hate it.
Thomas Adams
19 notes · View notes
vivekts · 3 years ago
Text
Immutability in Java😎
Simple guide to create Immutable types with pros😍 and cons😔
2 notes · View notes
fabfemmeboy · 4 years ago
Text
Immutability #5: Liberationists - 14/?
No, it’s not abandoned. Yes, it’s been forever.  Yes, I’m very sorry.
Title: Liberationists
Series: Immutability and Other Sins
Author: Kasey
Rating: PG-13 except for one chapter; AU; Klaine
Summary: In the new, post-Stonewall, liberated disco era, everything is possible...so why are old dreams so hard to obtain?
Read here
24 notes · View notes
obscurejavascript · 5 years ago
Text
Making Objects Immutable in JavaScript
If the below code blocks do not show up properly due to a recent Tumblr change. View them directly at https://obscurejavascript.tumblr.com/
By default any user created in JavaScript can have most of its properties modified. In some cases this can lead to confusing errors like a config setting object being updated via event driven code in a very hard to track down way. To avoid this property modifications of any kind can be prevented.
Firstly here is an example of the function in action:
const config = immutable({ id: 'test-1', adminUsers: [ { id: 'user-1', name: 'User 1' }, { id: 'user-2', name: 'User 2' }, { id: 'user-3', name: 'User 3' } ], }); // Simulate some event driven code doing an update setTimeout(() => { // This will either give an error in strict mode or newer environments or just // fail to do anything silently in other situations. config.adminUsers[1].name = 'User 2+'; }, 200); // Simulate some event driven code checking the config setTimeout(() => { console.log('User 2:', config.adminUsers[1]); }, 500);
This is the immutable:
function immutable(obj) { // Simple implementation to demonstrate the point. This is just example code. for (const property in obj) { if (obj.hasOwnProperty(property)) { const value = obj[property]; if (Array.isArray(value) || typeof value === 'object') { obj[property] = immutable(value); } } } return Object.freeze(obj); }
The immutable function simply goes through each property of an object and then freezes it. Note that Object.freeze will only freeze the top level properties. To freeze sub objects, the object property values need to be looped through. Since the above is just example code, it only goes deeper when an array or basic object of some form is encountered. Some edge cases may be missed.
I find this type of function very useful when trying to track down hard to follow modifications. I just set it on an object that gets modified in a hard to track down way and then a stack trace gives me exactly where that happened.
Github Location https://github.com/Jacob-Friesen/obscurejs/blob/master/2020/immutable.js
23 notes · View notes
revdavidbsmith · 5 years ago
Text
Psalm 119:89; March 9, 2020
2 notes · View notes
ragazzoarcano · 7 years ago
Text
"Non c’è nulla di immutabile, tranne l’esigenza di cambiare."
– Eraclito
886 notes · View notes
bananonbinary · 2 years ago
Text
some of yall use "amab" and "afab" as like, a woke substitute for "male" and "female" and its real weird. agab terminology is useful for talking about like, your personal life experiences and very specifically medical and legal problems you might run into. if you use it to describe a stranger then you're just going back to gender essentialism in a new hat. and implying you can clock everyone, to boot.
17K notes · View notes
bhgy123 · 2 years ago
Text
Data science, cryptography, artificial intelligence, blockchain......functions, importance, and value.....
Data science, cryptography, artificial intelligence, blockchain......functions, importance, and value.....
Data Science and AI ضیاء شبیر zia shabir What is data science, cryptography, artificial intelligence and blockchain? Data Science, Cryptography, Artificial Intelligence, and Blockchain are four distinct but interconnected fields of study that have revolutionized various aspects of our lives, from business to technology and beyond. In this blog, we’ll explore what each of these fields is all…
Tumblr media
View On WordPress
0 notes
devsnews · 2 years ago
Link
Immutability is essential in programming. It enables developers to create more reliable and predictable systems. Immutable data structures cannot be modified, which ensures that the data remains consistent and does not get corrupted or altered by unintended operations. This makes them safer for various applications, from web development to financial systems. Immutability also allows for better code readability and maintainability, eliminating the need to track and update data manually. Like other programming languages, Immutability is important in .NET C#, and this article will show you how to apply it in this programming language.
0 notes
bills-bible-basics · 3 years ago
Text
Tumblr media
IMMUTABILITY OF GOD'S WORD -- KJV (King James Version) Bible Verse List King James Version Bible verse list compiled by Bill Kochman concerning the topic "Immutability of God's Word". Visit my page at https://www.billkochman.com/VerseLists/ to see all the lists I've compiled to date. Thanks! "God is not a man, that he should lie; neither the son of man, that he should repent: hath he said, and shall he not do it? or hath he spoken, and shall he not make it good?" Numbers 23:19, KJV "LAMED. For ever, O LORD, thy word is settled in heaven." Psalm 119:89, KJV "I know that, whatsoever God doeth, it shall be for ever: nothing can be put to it, nor any thing taken from it: and God doeth it, that men should fear before him. That which hath been is now; and that which is to be hath already been; and God requireth that which is past." Ecclesiastes 3:14-15, KJV "Remember the former things of old: for I am God, and there is none else; I am God, and there is none like me, Declaring the end from the beginning, and from ancient times the things that are not yet done, saying, My counsel shall stand, and I will do all my pleasure:" Isaiah 46:9-10, KJV "God forbid: yea, let God be true, but every man a liar; as it is written, That thou mightest be justified in thy sayings, and mightest overcome when thou art judged." Romans 3:4, KJV "In hope of eternal life, which God, that cannot lie, promised before the world began;" Titus 1:2, KJV "Wherein God, willing more abundantly to shew unto the heirs of promise the immutability of his counsel, confirmed ‭it‭ by an oath:‭ That by two immutable things, in which ‭it was‭ impossible for God to lie, we might have a strong consolation, who have fled for refuge to lay hold upon the hope set before us:" Hebrews 6:17-18, KJV "Every good gift and every perfect gift is from above, and cometh down from the Father of lights, with whom is no variableness, neither shadow of turning." James 1:17, KJV "We have also a more sure word of prophecy; whereunto ye do well that ye take heed, as unto a light that shineth in a dark place, until the day dawn, and the day star arise in your hearts:" 2 Peter 1:19, KJV If you would like more info regarding the origin of these KJV Bible verse lists, go to https://www.billkochman.com/VerseLists/. Thank-you! https://www.billkochman.com/Blog/index.php/immutability-of-gods-word-kjv-king-james-version-bible-verse-list/?feed_id=17390&_unique_id=63705ff44d303&IMMUTABILITY%20OF%20GOD%27S%20WORD%20--%20KJV%20%28King%20James%20Version%29%20Bible%20Verse%20List
0 notes
fabfemmeboy · 4 years ago
Text
I finally finished a chapter, but it’s been so long since I wrote/posted anything that I honestly don’t remember where/how to post shit.
3 notes · View notes
obscurejavascript · 6 years ago
Text
Array Insertions With The Spread Operator
The spread operator ... helps make array operations much easier by removing method calls like concat and other management. For example, to combine two arrays and add a value into the middle of them with concat without mutating the arrays:
function insertInMiddle(array1, value, array2) { return array1.concat(value).concat(array2); } const arr1 = [1, 2, 3]; const arr2 = [5, 6, 7]; console.log(insertInMiddle(arr1, 4, arr2)); // [ 1, 2, 3, 4, 5, 6, 7 ] console.log(arr1); // [ 1, 2, 3 ] console.log(arr2); // [ 5, 6, 7 ]
That is not too bad, but will quickly become hard to manage if more array operations are done. Instead that can all be put in one array return with no extra methods:
function insertInMiddle2(array1, value, array2) { return [...array1, value, ...array2]; } console.log(insertInMiddle2(arr1, 4, arr2)); // [ 1, 2, 3, 4, 5, 6, 7 ] console.log(arr1); // [ 1, 2, 3 ] console.log(arr2); // [ 5, 6, 7 ]
It also appears the spread at least in some cases is faster than concat with arrays: https://jsperf.com/spread-vs-concat-vs-push
Github Location https://github.com/Jacob-Friesen/obscurejs/blob/master/2019/spreadArrayAdditions.js
5 notes · View notes
extravapalooza · 3 years ago
Note
Hey I saw you use the word "transsexuals" on one of your (gorgeous) pieces. I've been taught that's an outdated term, but I'm cis so it's not my place to say. Could you talk about what that word means to you?
think it has a swagful ring to it
edit: man how the fuck does this have people writing paragraphs i hate this damn post
23K notes · View notes
deweybertolini · 3 years ago
Text
Mountain Spring Water of Refreshment
Mountain Spring Water of Refreshment
“It is today as it was then.” Tell you what. As you are about to hear in this PODCAST, #ItSureIs!!! Thank you for listening, and for sharing this message!!! Please remember that depending upon your web browser and connection speed, it may take up to 60 seconds for this podcast to begin to play. God bless you richly as you listen.
Tumblr media
View On WordPress
0 notes
syndicode · 7 years ago
Text
Pros and cons of functional programming
This article is the translation based on the original material by Irina Linnik. We decided that these thoughts and considerations she wrote about can be quite useful for our English-speaking audience. Here we will tell you basic pros and cons of functional programming and show why you should c...
7 notes · View notes
marinersubmariner · 2 years ago
Photo
Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media
283 notes · View notes