TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

The Objective-C Runtime and Swift Dynamism

94 pointsby mrkdover 7 years ago

6 comments

thewayfarerover 7 years ago
This is particularly relevant right now. The swift-evolution mailing list is currently discussing adding a &quot;dynamic member lookup&quot; protocol to Swift to enhance interop with dynamic languages like Python, Ruby, and Perl. You can see the proposal here[0].<p>[0] <a href="https:&#x2F;&#x2F;gist.github.com&#x2F;lattner&#x2F;b016e1cf86c43732c8d82f90e5ae5438" rel="nofollow">https:&#x2F;&#x2F;gist.github.com&#x2F;lattner&#x2F;b016e1cf86c43732c8d82f90e5ae...</a>
dep_bover 7 years ago
I still like Objective-C even if it isn&#x27;t my go-to language anymore. It&#x27;s quite elegant compared to it&#x27;s peers from the 80&#x27;s, it&#x27;s a very small language yet you can achieve everything with it, even if it means dipping into C(++) for the parts that need to be really performant. But on the other hand seeing a different programming language when there&#x27;s some optimization going on and having another programming language for business logic is a great thing too.<p>How many times don&#x27;t we see bugs, errors or security issues stemming from the fact that business logic gets implemented in C?
评论 #15922206 未加载
btreesOfSpringover 7 years ago
I&#x27;m getting the loading error, &quot;An error occurred in the application and your page could not be served. If you are the application owner, check your logs for details.&quot;<p>Not sure if there is a mirror, a write-up, or another example anyone might be able to pass along.<p>edit: this google cache version is working[0].<p>[0] <a href="https:&#x2F;&#x2F;webcache.googleusercontent.com&#x2F;search?q=cache:gXiqzW0OV04J:https:&#x2F;&#x2F;academy.realm.io&#x2F;posts&#x2F;mobilization-roy-marmelstein-objective-c-runtime-swift-dynamic+&amp;cd=1&amp;hl=en&amp;ct=clnk&amp;gl=us&amp;lr=lang_de%7Clang_en" rel="nofollow">https:&#x2F;&#x2F;webcache.googleusercontent.com&#x2F;search?q=cache:gXiqzW...</a>
评论 #15915918 未加载
skueover 7 years ago
<i>&gt; Before we start, Objective-C is a runtime-oriented language, which means that all of the links between your methods and variables and classes are deferred to the last moment possible to when your app is actually running, and this gives you great flexibility because you can change those links. The alternative, where Swift is most of the time, is compiletime-oriented languages. So in Swift everything is a bit more harder bound, and you get more safety, but it’s less flexible.</i><p><i>&gt; This is what this debate was all about.</i><p>Not just <i>safety</i>, but also performance. Swift offers significant performance gains when you don’t need the dynamism. Swift lets you opt into dynamic features (as he later explains), and you can seemlessly interact with Objective C on Mac platforms. But you don’t have to pay the penalty for dynamism in the vast majority of your code that doesn’t use these features.<p>Edited: I also pointed out some additional mistakes in the post, but removed that because this comment got too long.
评论 #15918555 未加载
评论 #15918108 未加载
bogomipzover 7 years ago
&gt;&quot;Before we start, Objective-C is a runtime-oriented language, which means that all of the links between your methods and variables and classes are deferred to the last moment possible to when your app is actually running, ...&quot;<p>I had not heard the term &quot;runtime-oriented language&quot; before. Is this really just another term for &quot;supports reflection&quot;? If not what would be other examples of &quot;runtime-oriented&quot; languages?
评论 #15917392 未加载
评论 #15916590 未加载
评论 #15916620 未加载
评论 #15916826 未加载
评论 #15918035 未加载
评论 #15916614 未加载
IMcD23over 7 years ago
It&#x27;s important to note that this talk is from 2016. Since then, Swift 4 has been released, that added KVO and key paths to the language.