2,427 karma · joined Jun 15, 2023 (3y ago) · 1,641 submissions
comment 3y ago · link · parent
comment 3y ago · link · parent
comment 3y ago · link · parent
comment 3y ago · link · parent
comment 3y ago · link · parent
Assume that a = 1 is true
I just don't read code as I would a mathematical proof. I think in terms of what memory locations are equal to what in the stack, or the heap, and what is the lifecycle of that data in that memory address.When I read "int a = 1" in C#, I implicitly translate that to "take a 4 byte piece of memory on the stack, and set it equal to 1". I don't think in the abstract sense of a formula.
When I see a class like:
class Foo {
int x = 2;
string xyz = "Hello";
}
var foo = new Foo();
I read this as "allocate a chunk of memory big enough in the heap to insert a 4 byte integer and an 8 byte pointer. Set that 8 byte pointer equal to a static chunk of memory where the "Hello" string is pooled.comment 3y ago · link · parent
let a: int = 1 // Assignment
a = 3 // Testing equality, will give you an error
a <- 4 // Assignment, valid
There's an article here with more things:https://alexyakunin.medium.com/crying-out-loud-what-i-like-d...
I want to like F# since I love C#, but I just want something closer to Scala, but for .Net
comment 3y ago · link · parent
Compared to, say, XAML, where some elements can only have certain types of children, auto-populating data has to go in specific containers, and all the XAML tags map to actual C# classes, It's a much more strict, far less forgiving, and far less flexible syntax
comment 3y ago · link · parent
comment 3y ago · link · parent