Sunday, August 17, 2014

Swift is so cuckoo

Last day or so, I've been having a little play around on my new Mac Book Pro. Rather a nice machine. Anyway what I was trying to do is get create a window that I could hook into by D. The idea was to get DWC (D window creation), little library I'm working on for fun. To work on Mac OSX natively.

Only issue with this is.. I hate Objective-C. The best way I can explain this is, THEY BUTCHERED ALL MY PROGRAMMING IDEALS. Okay now that I have that out of the way.

The issue of this wasn't so much the language itself. No, unfortunately this is an issue with the way Apple built everything on top of it. Including Cocoa (hint pun in title).

Simple things such as an event loop I can't reproduce. Now this probably wouldn't have been such an issue. If I had stayed with Objective-C. No I went with swift. By in large this is ok.

I must admit though, Swift is nice, I like it. Its kinda like D in some ways. Just without the whole good community backing it. Or the generics, templates ext. but I'm sure you get my point.

How can I explain how I truly feel about all this. When building frameworks and libraries. You make it easy to use. But not so easy that all the wrappers and "good magical things" cannot be reproduced or modified.

So the outcome of all this is for me anyway:

  • Objective-C is a no go, forget it. Nada never again. No amount of money to go there.
  • Cocoa, some things are nice. And then when you want to add 1 second on to the current time its like four lines of code.. (D version is one small expression).
  • Swift is a rather nice language. Nothing much to say bad about it. Just don't expect too much low level control.
  • I should investigate Quartz, maybe the Posix code will run flawlessly with that.
To Apple:
You've done an amazing job on Swift don't stop now.
Cocoa needs to be looked at. I'm sorry but you need to give us devs more control over our applications. With documentation on how to build e.g. custom event loops. I get that you want to make things easier on us, but we need complete control for anything serious.
Oh and your hardware is also truly amazing would recommend just for that!

To anyone wanting to get into app development in Apple universe:
Think twice about it, seriously. Unless using something like Kivy or Mono.
This is not an environment you want to learn in. Even assembly is better.

To anyone long term in Apple community:
Have you really been so isolated that you can't see how awful it is?
Atleast you could pay me to work with C++.

Rant over.

No comments:

Post a Comment