What was wrong with Objective-C?

What was wrong with Objective-C?

Other urls found in this thread:

fuckingblocksyntax.com/
twitter.com/SFWRedditGifs

It's too subjective

What wasn't?

godawful syntax.

Didn't have monads.

Adding a shitty version of Smalltalk on top of C was never a good idea.

Shoo shoo Haskell-shill.

ObjC does look terrible.

# import "Integer.h"
# import "Integer+Arithmetic.h"
# import "Integer+Display.h"

int main(void) {
Integer *num1 = [Integer new], *num2 = [Integer new];
int x;

printf("Enter an integer: ");
scanf("%d", &x);

[num1 integer:x];
[num1 showstars];

printf("Enter an integer: ");
scanf("%d", &x);

[num2 integer:x];
[num2 showstars];

[num1 add:num2];
[num1 showint];

return 0;
}


Swift was such an upgrade from that shit.

that's horrifying
is there a GC in use here? what the fuck

It has automatic reference counting.

that's confusing as fuck
what happens if I malloc?

You can use it from what I know. You'd use malloc or free if you didn't want to wait for the runtime to clean up your pointer.

>objective C
>hey let's take java
>and make it look completely different for no reason
>but were keeping C in the name

More like objectively trash

It was pretty comfy desu senpai.
I make top dollar maintaining ObjC apps

Block syntax was the only problem with Objective C

fuckingblocksyntax.com/

That just looks like function pointer syntax. What's hard about that?

> that's confusing as fuck

imagine being that much of a brainlet. how can you not understand reference counting, let alone already know what ARC is before ever posting in a programming language thread

Objective-C predates Java by 11 years

I know what reference counting is, I just don't see how this fits into the same framework as C. Are all pointers managed by the garbage collector?

ARC and Garbage Collection are different, GC runs in the background and works mostly unpredictably, ARC deallocation is done as soon as possible so it's controllable.

ARC w/ cycle detection and GC are equivalent operations, strictly speaking.

ARC, then. Is ARC used for all pointers?

it's objectively bad