{"id":1841,"date":"2015-06-15T10:51:49","date_gmt":"2015-06-15T08:51:49","guid":{"rendered":"http:\/\/www.flagsoft.com\/cmswp\/?p=1841"},"modified":"2016-10-20T13:06:28","modified_gmt":"2016-10-20T11:06:28","slug":"swift-how-can-i-use-mutual-dependencies-forward-declarations","status":"publish","type":"post","link":"https:\/\/www.flagsoft.com\/cmswp\/swift-how-can-i-use-mutual-dependencies-forward-declarations\/","title":{"rendered":"Swift: How can I use mutual dependencies, forward declarations?"},"content":{"rendered":"<p>Function A() calles function B() and function B() calls function A().<\/p>\n<p>Some uses forward declarations like Pascal.<\/p>\n<p>Swift needs to have those in the same line.<\/p>\n<pre>\/\/ -- Swift: get around mutual dependencies: Put code in the same line. Strange notation.\r\n\r\ndoMain(); func doMain()\r\n{\r\n    println(\"Hello from doMain!\")\r\n}<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Function A() calles function B() and function B() calls function A(). Some uses forward declarations like Pascal. Swift needs to have those in the same line. \/\/ &#8212; Swift: get around mutual dependencies: Put code in the same line. Strange notation. doMain(); func doMain() { println(&#171;Hello from doMain!&#187;) } &nbsp;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"","_jetpack_memberships_contains_paid_content":false,"footnotes":"","_links_to":"","_links_to_target":""},"categories":[9],"tags":[],"class_list":["post-1841","post","type-post","status-publish","format-standard","hentry","category-swift"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Swift: How can I use mutual dependencies, forward declarations? - Flagsoft<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.flagsoft.com\/cmswp\/swift-how-can-i-use-mutual-dependencies-forward-declarations\/\" \/>\n<meta property=\"og:locale\" content=\"de_DE\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Swift: How can I use mutual dependencies, forward declarations? - Flagsoft\" \/>\n<meta property=\"og:description\" content=\"Function A() calles function B() and function B() calls function A(). Some uses forward declarations like Pascal. Swift needs to have those in the same line. \/\/ -- Swift: get around mutual dependencies: Put code in the same line. Strange notation. doMain(); func doMain() { println(&quot;Hello from doMain!&quot;) } &nbsp;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.flagsoft.com\/cmswp\/swift-how-can-i-use-mutual-dependencies-forward-declarations\/\" \/>\n<meta property=\"og:site_name\" content=\"Flagsoft\" \/>\n<meta property=\"article:published_time\" content=\"2015-06-15T08:51:49+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2016-10-20T11:06:28+00:00\" \/>\n<meta name=\"author\" content=\"M\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Geschrieben von\" \/>\n\t<meta name=\"twitter:data1\" content=\"M\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.flagsoft.com\/cmswp\/swift-how-can-i-use-mutual-dependencies-forward-declarations\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.flagsoft.com\/cmswp\/swift-how-can-i-use-mutual-dependencies-forward-declarations\/\"},\"author\":{\"name\":\"M\",\"@id\":\"https:\/\/www.flagsoft.com\/cmswp\/#\/schema\/person\/01159effaa2678b9655388109ddf07f0\"},\"headline\":\"Swift: How can I use mutual dependencies, forward declarations?\",\"datePublished\":\"2015-06-15T08:51:49+00:00\",\"dateModified\":\"2016-10-20T11:06:28+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.flagsoft.com\/cmswp\/swift-how-can-i-use-mutual-dependencies-forward-declarations\/\"},\"wordCount\":36,\"commentCount\":0,\"articleSection\":[\"Swift\"],\"inLanguage\":\"de-CH\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.flagsoft.com\/cmswp\/swift-how-can-i-use-mutual-dependencies-forward-declarations\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.flagsoft.com\/cmswp\/swift-how-can-i-use-mutual-dependencies-forward-declarations\/\",\"url\":\"https:\/\/www.flagsoft.com\/cmswp\/swift-how-can-i-use-mutual-dependencies-forward-declarations\/\",\"name\":\"Swift: How can I use mutual dependencies, forward declarations? - Flagsoft\",\"isPartOf\":{\"@id\":\"https:\/\/www.flagsoft.com\/cmswp\/#website\"},\"datePublished\":\"2015-06-15T08:51:49+00:00\",\"dateModified\":\"2016-10-20T11:06:28+00:00\",\"author\":{\"@id\":\"https:\/\/www.flagsoft.com\/cmswp\/#\/schema\/person\/01159effaa2678b9655388109ddf07f0\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.flagsoft.com\/cmswp\/swift-how-can-i-use-mutual-dependencies-forward-declarations\/#breadcrumb\"},\"inLanguage\":\"de-CH\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.flagsoft.com\/cmswp\/swift-how-can-i-use-mutual-dependencies-forward-declarations\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.flagsoft.com\/cmswp\/swift-how-can-i-use-mutual-dependencies-forward-declarations\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.flagsoft.com\/cmswp\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Swift: How can I use mutual dependencies, forward declarations?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.flagsoft.com\/cmswp\/#website\",\"url\":\"https:\/\/www.flagsoft.com\/cmswp\/\",\"name\":\"Flagsoft\",\"description\":\"ALPHA Schulmagazin, Byztxt, Strongsdict, Remote Control Cursor for Mac, PictureViewer4Mac, sdspeed free SD Card Reader for Mac OS X, Byztxt Light, 1A Shopping List, Kindle Book Template\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.flagsoft.com\/cmswp\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"de-CH\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.flagsoft.com\/cmswp\/#\/schema\/person\/01159effaa2678b9655388109ddf07f0\",\"name\":\"M\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"de-CH\",\"@id\":\"https:\/\/www.flagsoft.com\/cmswp\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/3eea8d3678df652d127d9fa625eacfd1?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/3eea8d3678df652d127d9fa625eacfd1?s=96&d=mm&r=g\",\"caption\":\"M\"},\"url\":\"https:\/\/www.flagsoft.com\/cmswp\/author\/admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Swift: How can I use mutual dependencies, forward declarations? - Flagsoft","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.flagsoft.com\/cmswp\/swift-how-can-i-use-mutual-dependencies-forward-declarations\/","og_locale":"de_DE","og_type":"article","og_title":"Swift: How can I use mutual dependencies, forward declarations? - Flagsoft","og_description":"Function A() calles function B() and function B() calls function A(). Some uses forward declarations like Pascal. Swift needs to have those in the same line. \/\/ -- Swift: get around mutual dependencies: Put code in the same line. Strange notation. doMain(); func doMain() { println(\"Hello from doMain!\") } &nbsp;","og_url":"https:\/\/www.flagsoft.com\/cmswp\/swift-how-can-i-use-mutual-dependencies-forward-declarations\/","og_site_name":"Flagsoft","article_published_time":"2015-06-15T08:51:49+00:00","article_modified_time":"2016-10-20T11:06:28+00:00","author":"M","twitter_card":"summary_large_image","twitter_misc":{"Geschrieben von":"M"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.flagsoft.com\/cmswp\/swift-how-can-i-use-mutual-dependencies-forward-declarations\/#article","isPartOf":{"@id":"https:\/\/www.flagsoft.com\/cmswp\/swift-how-can-i-use-mutual-dependencies-forward-declarations\/"},"author":{"name":"M","@id":"https:\/\/www.flagsoft.com\/cmswp\/#\/schema\/person\/01159effaa2678b9655388109ddf07f0"},"headline":"Swift: How can I use mutual dependencies, forward declarations?","datePublished":"2015-06-15T08:51:49+00:00","dateModified":"2016-10-20T11:06:28+00:00","mainEntityOfPage":{"@id":"https:\/\/www.flagsoft.com\/cmswp\/swift-how-can-i-use-mutual-dependencies-forward-declarations\/"},"wordCount":36,"commentCount":0,"articleSection":["Swift"],"inLanguage":"de-CH","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.flagsoft.com\/cmswp\/swift-how-can-i-use-mutual-dependencies-forward-declarations\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.flagsoft.com\/cmswp\/swift-how-can-i-use-mutual-dependencies-forward-declarations\/","url":"https:\/\/www.flagsoft.com\/cmswp\/swift-how-can-i-use-mutual-dependencies-forward-declarations\/","name":"Swift: How can I use mutual dependencies, forward declarations? - Flagsoft","isPartOf":{"@id":"https:\/\/www.flagsoft.com\/cmswp\/#website"},"datePublished":"2015-06-15T08:51:49+00:00","dateModified":"2016-10-20T11:06:28+00:00","author":{"@id":"https:\/\/www.flagsoft.com\/cmswp\/#\/schema\/person\/01159effaa2678b9655388109ddf07f0"},"breadcrumb":{"@id":"https:\/\/www.flagsoft.com\/cmswp\/swift-how-can-i-use-mutual-dependencies-forward-declarations\/#breadcrumb"},"inLanguage":"de-CH","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.flagsoft.com\/cmswp\/swift-how-can-i-use-mutual-dependencies-forward-declarations\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.flagsoft.com\/cmswp\/swift-how-can-i-use-mutual-dependencies-forward-declarations\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.flagsoft.com\/cmswp\/"},{"@type":"ListItem","position":2,"name":"Swift: How can I use mutual dependencies, forward declarations?"}]},{"@type":"WebSite","@id":"https:\/\/www.flagsoft.com\/cmswp\/#website","url":"https:\/\/www.flagsoft.com\/cmswp\/","name":"Flagsoft","description":"ALPHA Schulmagazin, Byztxt, Strongsdict, Remote Control Cursor for Mac, PictureViewer4Mac, sdspeed free SD Card Reader for Mac OS X, Byztxt Light, 1A Shopping List, Kindle Book Template","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.flagsoft.com\/cmswp\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"de-CH"},{"@type":"Person","@id":"https:\/\/www.flagsoft.com\/cmswp\/#\/schema\/person\/01159effaa2678b9655388109ddf07f0","name":"M","image":{"@type":"ImageObject","inLanguage":"de-CH","@id":"https:\/\/www.flagsoft.com\/cmswp\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/3eea8d3678df652d127d9fa625eacfd1?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3eea8d3678df652d127d9fa625eacfd1?s=96&d=mm&r=g","caption":"M"},"url":"https:\/\/www.flagsoft.com\/cmswp\/author\/admin\/"}]}},"jetpack_featured_media_url":"","uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"mailpoet_newsletter_max":false,"woocommerce_thumbnail":false,"woocommerce_single":false,"woocommerce_gallery_thumbnail":false,"yarpp-thumbnail":false,"slide-thumbnail":false},"uagb_author_info":{"display_name":"M","author_link":"https:\/\/www.flagsoft.com\/cmswp\/author\/admin\/"},"uagb_comment_info":7,"uagb_excerpt":"Function A() calles function B() and function B() calls function A(). Some uses forward declarations like Pascal. Swift needs to have those in the same line. \/\/ -- Swift: get around mutual dependencies: Put code in the same line. Strange notation. doMain(); func doMain() { println(\"Hello from doMain!\") } &nbsp;","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.flagsoft.com\/cmswp\/wp-json\/wp\/v2\/posts\/1841","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.flagsoft.com\/cmswp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.flagsoft.com\/cmswp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.flagsoft.com\/cmswp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.flagsoft.com\/cmswp\/wp-json\/wp\/v2\/comments?post=1841"}],"version-history":[{"count":0,"href":"https:\/\/www.flagsoft.com\/cmswp\/wp-json\/wp\/v2\/posts\/1841\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.flagsoft.com\/cmswp\/wp-json\/wp\/v2\/media?parent=1841"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.flagsoft.com\/cmswp\/wp-json\/wp\/v2\/categories?post=1841"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.flagsoft.com\/cmswp\/wp-json\/wp\/v2\/tags?post=1841"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}