Hacker News new | ask | show | jobs
by mucholove 1645 days ago
So I use GNUstep and I really like it.

It is not an Apple emulator—it is an OPENstep emulator and so it implements the amazing Cocoa API and many mac/iOS frameworks can be used server side with minimal porting.

This makes it easy for what I intend to keep as a one person project forever or as long as Apple continues to support Objective-C.

You want to know an unpopular opinion?? I love Objective-C and I think it is better—way better than Swift. And—if you have discipline, the preprocessor is excellent.

So while many might say GNUstep is buggy, it is working for several of us—and happily so.

I do agree that the homepage is terrible and that what should be done is put some installer scripts so you can start using it immediately. An Ubuntu installation following the corresponding script here is foolproof: https://github.com/plaurent/gnustep-build

Check it out!!

3 comments

Well, for one thing it's not an emulator... AT ALL. And for another thing the idea behind GNUstep since about 2000 has been to implement Cocoa. I do appreciate your enthusiasm. :)

Greg C. GNUstep Maintainer

> You want to know an unpopular opinion?? I love Objective-C and I think it is better—way better than Swift. And—if you have discipline, the preprocessor is excellent.

Very curious to the reasoning here. If you can get to the pointer level of Swift, you basically have obj-c without all the unnecessary syntax?

In my view, excessive syntax is a crutch to make the language parser's job easier, not making the thought to code job easier. Obj-C seems to suffer from the excessive syntax?

> In my view, excessive syntax is a crutch to make the language parser's job easier, not making the thought to code job easier. Obj-C seems to suffer from the excessive syntax?

Another perspective is that the syntax of Obj-C exposes and supports the core model of the language, which is objects sending messages to each other. That it happens to be fast to parse seems secondary, and certainly further developments since version 2.0 have made parsing slower, not faster.

In my experience people complain about Obj-C syntax when what they actually dislike are verbose Cocoa/Foundation/etc APIs. Try their C Core* equivalents and you'll find you probably dislike those, too.

> In my experience people complain about Obj-C syntax when what they actually dislike are verbose Cocoa/Foundation/etc APIs

If so, that’s a real shame. Foundation may be the single best-designed standard library for a (non-functional) language ever.

I agree, Foundation is a gem! The method naming is one of the assets - the names are clear, regular, and usually fairly obvious. The downside to that regularity and clarity is that the names are long.

One CoreFoundation example at random:

    CFURLRef CFURLCreateCopyDeletingLastPathComponent(CFAllocatorRef allocator, CFURLRef ref);
I think nearly everyone who reads that prototype will immediately understand what it does, but there's no denying it's a mouthful.

Tack on some unfamilar square-brackets and intersperse argument names, and it's understandable that people will conflate the syntax with the APIs.

For me Foundation lacks composability. This method should be really two: CreateCopy (I assume it already exist) and mutating DeleteLastPathComponent.

I don't mention immutable by default behavior because it was long ago and written in C.

CoreFoundation is not written in ObjC, it's C only (although toll-free bridged).
I love the expressiveness of Obj-C, I love the brackets, and I love how easy it is to write.

I hate Swifts boiler plate words (var, let [why not const???], func), I hate the obtuseness of it (eg question marks everywhere), and I hate how hard it is to read because it makes it very easy to be so "clever".

To be fair, the syntax has changed since the days of NeXT. Accessing object variables been more C like (dot notation).

Personally, I never had any difficulties understanding the old syntax.

If anything, the old syntax was pure and consistent with what actually happens - message sending. Dot notation muddies the waters, IMO, but certainly is convenient. Ditto the collection literals.
I still say they did properties wrong. If you have a property prop, it should synthesize methods prop and prop: and expose them to the user. Then, to get you say [obj prop] and to set you say [obj prop: newVal]. This is a convention widely used in Smalltalk, and is nearly as convenient to use as dot notation. Dot notation in Objective-C makes the dot operator mean two different things; and in one case it takes a bare struct and in the other case it takes a pointer. Utterly weird. But it's a belt onion: done because it was the style at the time.
This is in fact how @property works; the declaration is sugar for a pair of accessor methods. The dot syntax is sugar for calling those methods.

    #include <Foundation/Foundation.h>

    @interface Foo : NSObject
    @property (copy) NSString *bar;
    @end

    @implementation Foo
    @end

    int main(int argc, char *argv[]) {
        Foo *foo = [Foo new];
        [foo setBar:@"Hello, world!"];
        NSLog(@"%@", [foo bar]);
        return 0;
    }
The dot syntax makes it difficult to parse whether you are dealing with a C struct or an Objective-C object.

Objective-C was grafted onto C with very clear demarcation lines.

We don’t mind being able to declare a property with `@property`. We do mind that they introduced dot syntax

> I love Objective-C and I think it is better—way better than Swift.

You are not the only one. This is exactly how I feel.

But GNUstep is ... not great. I want it to be! But it needs a lot of work on the interface side.

Judging by your comments, you seemed to have talked to the GNUstep maintainers, but they haven't been receptive to your ideas.

May I propose a fork? How about SiDESTEP ® for the project name?

No one ever spoke to me and I am the lead. Also SIDESTEP has been taken by another project. :)
Email me... anyone is free to join at any time. The whole project would appreciate the help.
I am already on the mailing list (and I even backed the failed Kickstarter :'( ).

My issue is it needs an entirely new UI, and the last time that was brought up it was clear nobody active wanted to do that.