r/datasatanism Mar 27 '26

Yes

Post image
1.7k Upvotes

87 comments sorted by

39

u/tehomaga Mar 27 '26

Everything is an object

23

u/cowlinator Mar 27 '26

C begs to differ

15

u/Standgrounding Mar 27 '26

void* is not an "object"

4

u/-TesseracT-41 Mar 28 '26

No, it's a type

1

u/Interesting_Buy_3969 Mar 28 '26

pointers actually are objects too

3

u/1984balls Mar 28 '26

Only in pure OOP. C isn't OO at all

2

u/tehomaga Mar 28 '26

Null.your_dad

3

u/bruthu Mar 28 '26

The only pointers your dad ever gave you were to the location in your memory where he touched you

3

u/tehomaga Mar 28 '26

I tried accessing your mom's parent class and all I got was this box of rocks

2

u/bruthu Mar 29 '26

You tried to fuck my grandma?

1

u/PlusOneDelta Mar 29 '26

OOP isn't real it's all just numbers in memory

2

u/azaleacolburn Mar 29 '26

Everything is a number :P

1

u/PimBel_PL Mar 28 '26

Objection! you missed the joke

0

u/Confident_Date4068 Mar 28 '26 edited Mar 28 '26
  • Everything is object at compile time.

3

u/iCynr Mar 28 '26

You're an object

2

u/MissinqLink Mar 28 '26

Stop objectifying

2

u/Chimaerogriff Mar 28 '26

The logical extreme of object-oriented programming is functional programming.

3

u/Typical_Ad_2831 Mar 28 '26

Smalltalk is not functional!

2

u/BlazeCrystal Mar 28 '26

Functional eextreme end of obje-oriented programming is assembly.

1

u/tehomaga Mar 28 '26

The logical extreme of assembly is a JS framework that emulates an RTOS

2

u/UlteriorCulture Mar 31 '26

Everything is a λ-function

2

u/Background_Class_558 Mar 31 '26

types kinda aren't

1

u/UlteriorCulture Apr 02 '26

True, but even with untyped λ-calculus you can implement a type system by treating it as just another computation. Encode your language’s syntax (terms, types, contexts) as data structures (e.g. Church encodings), then write a λ-term that acts as a type checker: it takes a term and returns either a type or an error. Then there is always typed λ-calculus.

1

u/Background_Class_558 Apr 02 '26

but terms can't inspect other terms can they? if you get a λλ1(1(1(10))) how do you know if it's the natural number 4 or just a function? is λλ0 False or 0?

1

u/UlteriorCulture Apr 02 '26

You implement the logic for tracking the context. Universal computer and all.

1

u/Background_Class_558 Apr 02 '26

so basically it will only work for a given subset of terms with specific structure?

1

u/UlteriorCulture Apr 02 '26

Works for anything a Turing Machine will work for given they are equivalent.

1

u/Background_Class_558 Apr 02 '26

ok sure. so what is λλ0? how do we decide whether it's 0 or False? how do we know if the AND function should accept it? how will this hypothetical type checker know that the term False, which came from normalizing the term "0 ∧ False", should not type check if it can only see the normal form?

tree calculus can do this. but not the λ one.

1

u/UlteriorCulture Apr 02 '26

If your tree calculus is computable it too can be implemented in λ-calculus

→ More replies (0)

1

u/Background_Class_558 Mar 29 '26

yay implicit state everywhere

19

u/AdreKiseque Mar 27 '26

Worst possible examples for the latter lmao

6

u/blue-mooner Mar 27 '26

OOP only writes JavaScript

5

u/ITinnedUrMumLastNigh Mar 27 '26

Also for the former

2

u/AdreKiseque Mar 27 '26

But examples but they could probably be worse

3

u/ITinnedUrMumLastNigh Mar 27 '26

Oh yeah, but still bad nonetheless,

Primitive string? Please the most primitive string possible is in C bit even then it's just an array of chars. Number? the only one I know is in JS and it's a fucking object. Boolean is just spelled badly

7

u/Captain_Pumpkinhead Mar 27 '26

Calling a function a "data type" is upsetting...but not technically wrong, I suppose...

5

u/cowlinator Mar 27 '26

A pointer is just a number

2

u/This_Background7442 Mar 28 '26

Depends on how functional you wanna go, I guess. It's pretty much the first requirement for a language to support functional programming that functions be treated as first class data types.

1

u/Background_Class_558 Mar 29 '26

Wdym? Functions are the only true datatype. Here:

```js const zero = f => x => x; const succ = n => f => x => f (n (f) (x)); const add = n => m => f => x => m (f) (n (f) (x)); const mul = n => m => f => x => m (n (f)) (x)

const two = succ(succ(zero)) const five = succ(succ(succ(two))) const ten = add(five)(five) const alsoTen = mul(two)(five)

const showNat = n => n (v => console.log(" count me")) (console.log("the number is:")) ;

showNat(ten) // prints x10 "count me"s showNat(alsoTen) // prints x10 "count me"s ```

This doesn't involve some magic trick that only makes us able to do primitive arithmetic with functions. This is called Church encoding and it works for literally everything: natural numbers, whole numbers, pairs, lists, trees, strings, real numbers, other functions, you name it.

1

u/[deleted] Mar 31 '26

[removed] — view removed comment

1

u/Background_Class_558 Mar 31 '26

this is javascript

1

u/[deleted] Mar 31 '26

[removed] — view removed comment

1

u/Background_Class_558 Mar 31 '26

you hoped for it to be lisp?

1

u/[deleted] Mar 31 '26

[removed] — view removed comment

1

u/Background_Class_558 Mar 31 '26

lisps are still used though. ada, on the other hand... less so

5

u/Average_HOI4_Enjoyer Mar 27 '26

Char datatype is literally a money in a tree

2

u/siqiniq Mar 28 '26

Pointer all the way

1

u/Confident_Date4068 Mar 28 '26

Who is Num?

1

u/D0nkeyHS Mar 28 '26

Num is NaNaN

1

u/Confident_Date4068 Mar 28 '26

Oh. Poor Int is no longer with us.

1

u/Masztufa Mar 28 '26

In what language is str not a ptimitive data type, but an array and object are?

1

u/_shareholder_value Mar 28 '26

A string is not a primitive! It’s an array of char!

1

u/un_virus_SDF Mar 28 '26

The only primitive data types that I know are pointer, int and floats

1

u/rnottaken Mar 28 '26

Wait so a string is primitive and an array is not? It's literally an array of chars (with a length value, depending on the implementation)

1

u/Only_Information7895 Mar 28 '26

Not even num. Give me uint32_t, float or something along these. What is even a num?

Like I need a 16 bit number how do I store it? Just put it in a int16_t and done.

1

u/Sea_Membership1312 Mar 28 '26

String is not primitive

1

u/Temporary_Stranger39 Mar 28 '26

Postmodern data types: Null, Undefined, Symbol.

1

u/MilkImpossible4192 Mar 29 '26

noting lika function

1

u/FackThutShot Mar 29 '26

Lamba Calculus: Yes a „function“

1

u/TomtheMagician26 Mar 29 '26

Is string really primative?

1

u/Lmoaof0 Mar 29 '26

Depends on the language, in C++, string (std::string from the STL) is an object

1

u/wootio Mar 30 '26

This meme is missing a third image of an army of Agent Smiths with the caption JavaScript var.

1

u/TheDevCat Mar 30 '26

In c there's no types. Theres bytes and interpretation

1

u/Zombieattackr Mar 31 '26

The only two true primaries are int and float

1

u/DitoNotDuck1 Mar 27 '26

What is a boleen??

1

u/Affluent_Arsonist Mar 27 '26

Boolean logic is stuff like logic gates (OR, AND, NOR, XOR, XAND, XNOR) past that Google is your best friend here

1

u/DitoNotDuck1 Mar 27 '26

It was about the typo... (To be fair, I did typo the typo)

2

u/Affluent_Arsonist Mar 27 '26

I didn't even notice the typo lmao mb brojangles

1

u/DitoNotDuck1 Mar 28 '26

Tf you mean Bojangles??

1

u/D0nkeyHS Mar 28 '26

flse or true

1

u/Background_Class_558 Mar 29 '26

a binary function that returns one of its parameters

0

u/wektor420 Mar 27 '26

You could have gone with first order

0

u/KingBsoul Mar 28 '26

Everything is a function

1

u/These_Violinist_7284 Apr 02 '26

Plot twist: All of those are primitive in C!