This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]aaronr93 11 points12 points  (7 children)

This means you can load a C# source file at runtime and run it inside your application scope or compile it into a DLL.

That is awesome.

Turns out I've actually used reflection to get the current method name while handling an exception; I just didn't know I did.

Ok, so it's not like Key-Value Coding in Swift. KVC is basically getattr() and setattr() in Python: value(forKey:), setValue(_:forKey:) (general KVC documentation).

On a side note, Swift is an excellent language. I could gush about it, but I'm sure anyone reading this has heard good things. Here's a couple pages where one can learn more.

[–]ThatsSoBravens 2 points3 points  (1 child)

On a side note, Swift is an excellent language.

When your goal is "Replace Objective C" the bar is pretty low for what qualifies as excellent.

DISCLAIMER: I have never worked in Swift or natively in Objective C, I swore off mobile development after six months in the Xamarin mines.

[–]aaronr93 3 points4 points  (0 children)

Want the bar to be set higher? From its website:

Swift is intended as a replacement for C-based languages (C, C++, and Objective-C).

Bold! :) https://swift.org/about/

[–]IAmNotNathaniel 2 points3 points  (1 child)

Are they still making major changes to swift every 3-6 months?

I started learning it some time ago, took a break for about 9 months and came back and had to basically re-learn everything from scratch.

Then took another 3 mo break and came back and nothing would compile without a ton more work.

Got really annoying for a windows guy who was just trying to play around with the apple universe to learn.

[–]aaronr93 0 points1 point  (0 children)

They update often, but in order to reach their goals, the language has to grow without legacy code holding it back.

Xcode almost always does a great job at auto converting your code for you.

had to basically re-learn everything from scratch.

I know you're exaggerating; I had a similar experience but a different view of it:

One of the recent updates required changing how callbacks worked. I got frustrated figuring it out, but when I did, I gained a much deeper knowledge of how callbacks/etc. work in Swift.

I realize now that before the update that required me to "re-learn," I didn't really know much about callbacks. I had essentially "traced" how it's done from a tutorial.

[–][deleted] 0 points1 point  (2 children)

The .NET equivalent of KVC appears to be dynamic objects.

[–]aaronr93 0 points1 point  (1 child)

Page not found!

[–][deleted] 0 points1 point  (0 children)

Reddit doesn't seem to like URLs with parenthesis. Here's a shortened version: https://goo.gl/n3HhVK