<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://homeostasis.scs.carleton.ca/wiki/index.php?action=history&amp;feed=atom&amp;title=Mobile_App_Development_2022W_Lecture_3</id>
	<title>Mobile App Development 2022W Lecture 3 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://homeostasis.scs.carleton.ca/wiki/index.php?action=history&amp;feed=atom&amp;title=Mobile_App_Development_2022W_Lecture_3"/>
	<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Mobile_App_Development_2022W_Lecture_3&amp;action=history"/>
	<updated>2026-04-06T01:53:00Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Mobile_App_Development_2022W_Lecture_3&amp;diff=23689&amp;oldid=prev</id>
		<title>Soma: /* Video */</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Mobile_App_Development_2022W_Lecture_3&amp;diff=23689&amp;oldid=prev"/>
		<updated>2022-01-19T22:27:18Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Video&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 22:27, 19 January 2022&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l5&quot;&gt;Line 5:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 5:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [https://homeostasis.scs.carleton.ca/~soma/mad-2022w/lectures/comp1601-2022w-lec03-20220119.cc.vtt auto-generated captions]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [https://homeostasis.scs.carleton.ca/~soma/mad-2022w/lectures/comp1601-2022w-lec03-20220119.cc.vtt auto-generated captions]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Video is also available through Brightspace (Resources-&amp;gt;Zoom Meetings (Recordings, etc.)-&amp;gt;Cloud Recordings tab).  Note that here you&amp;#039;ll also see chat messages.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Video is also available through Brightspace (Resources-&amp;gt;Zoom Meetings (Recordings, etc.)-&amp;gt;Cloud Recordings tab).  Note that here you&amp;#039;ll also see chat messages.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;(Above links are currently broken, will be fixed once class is over.)&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Notes==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Notes==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Soma</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Mobile_App_Development_2022W_Lecture_3&amp;diff=23688&amp;oldid=prev</id>
		<title>Soma: /* Video */</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Mobile_App_Development_2022W_Lecture_3&amp;diff=23688&amp;oldid=prev"/>
		<updated>2022-01-19T18:07:15Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Video&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 18:07, 19 January 2022&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Video==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Video==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Video from the lecture given on January 19, 2022 is now available:&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* [https://homeostasis.scs.carleton.ca/~soma/mad-2022w/lectures/comp1601-2022w-lec03-20220119.m4v video]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* [https://homeostasis.scs.carleton.ca/~soma/mad-2022w/lectures/comp1601-2022w-lec03-20220119.cc.vtt auto-generated captions]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Video is also available through Brightspace (Resources-&amp;gt;Zoom Meetings (Recordings, etc.)-&amp;gt;Cloud Recordings tab).  Note that here you&#039;ll also see chat messages.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;(Above links are currently broken, will be fixed once class is over.)&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Notes==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Notes==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Soma</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Mobile_App_Development_2022W_Lecture_3&amp;diff=23687&amp;oldid=prev</id>
		<title>Soma: Created page with &quot;==Video==  ==Notes==  &lt;pre&gt; Lecture 3 ---------  - how to succeed in this class    - how to suceed in computer science  - Tutorial 2  For tutorial checkoff  - no more than one...&quot;</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Mobile_App_Development_2022W_Lecture_3&amp;diff=23687&amp;oldid=prev"/>
		<updated>2022-01-19T18:06:05Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;==Video==  ==Notes==  &amp;lt;pre&amp;gt; Lecture 3 ---------  - how to succeed in this class    - how to suceed in computer science  - Tutorial 2  For tutorial checkoff  - no more than one...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Video==&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Lecture 3&lt;br /&gt;
---------&lt;br /&gt;
 - how to succeed in this class&lt;br /&gt;
   - how to suceed in computer science&lt;br /&gt;
 - Tutorial 2&lt;br /&gt;
&lt;br /&gt;
For tutorial checkoff&lt;br /&gt;
 - no more than one week behind&lt;br /&gt;
 - so I can checkoff Tutorial 1 while we&amp;#039;re doing Tutorial 2, but&lt;br /&gt;
   not once we do Tutorial 3&lt;br /&gt;
 - don&amp;#039;t fall behind!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
From the Teams discussion&lt;br /&gt;
 - if you have too much in a View, you can use group to fit in more&lt;br /&gt;
&lt;br /&gt;
How to succeed in this class&lt;br /&gt;
 - You *should* use Internet resources.  Search away!&lt;br /&gt;
 - But...that is just the start, not the end&lt;br /&gt;
    - don&amp;#039;t stop once your code is working&lt;br /&gt;
    - continue until you understand why it works!&lt;br /&gt;
&lt;br /&gt;
The ultimate source of truth in software systems is always the code&lt;br /&gt;
 - documentation is always incomplete, and it is often wrong&lt;br /&gt;
    - especially for systems that are being actively developed,&lt;br /&gt;
      docs can refer to older versions&lt;br /&gt;
     &lt;br /&gt;
But when you&amp;#039;re dealing with commercial systems, the code is often not all&lt;br /&gt;
available&lt;br /&gt;
 - so then use documentation where it exists&lt;br /&gt;
 - where it doesn&amp;#039;t, do experiments!&lt;br /&gt;
&lt;br /&gt;
Trust the documentation...but verify&lt;br /&gt;
 - sometimes your code is fine, it is other people&amp;#039;s code that is broken!&lt;br /&gt;
&lt;br /&gt;
Because Internet resources are so rich, many people fall into copy-paste-fiddle&lt;br /&gt;
 - and so they never really understand why things work or not&lt;br /&gt;
&lt;br /&gt;
Your goal, always, is to enrich your mental model of how things work&lt;br /&gt;
 - computers in general, and the software specifically that you are working with&lt;br /&gt;
 - but, remember your model will *always* be incomplete&lt;br /&gt;
&lt;br /&gt;
This really matters in mobile development&lt;br /&gt;
 - your code runs on top of lots of other people&amp;#039;s code&lt;br /&gt;
 - that code keeps changing and won&amp;#039;t be completely documented&lt;br /&gt;
&lt;br /&gt;
I&amp;#039;m no master of Swift or Kotlin&lt;br /&gt;
 - but, I have many years of experience with lots of software systems&lt;br /&gt;
   and languages&lt;br /&gt;
 - and basically the same ideas are used again and again&lt;br /&gt;
    - keep an eye out for concepts you haven&amp;#039;t learned before...and&lt;br /&gt;
      then go learn them!&lt;br /&gt;
&lt;br /&gt;
declaring variables&lt;br /&gt;
 - var: variable that can change value&lt;br /&gt;
 - let: variable that can&amp;#039;t change variable (so it is immutable)&lt;br /&gt;
   - but remember scoping rules, the same name isn&amp;#039;t always referring to the same data&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
structs and classes&lt;br /&gt;
 - a class is like objects in other languages&lt;br /&gt;
 - a struct is an immutable data structure&lt;br /&gt;
&lt;br /&gt;
You declare a struct by saying the name of the struct, the type, and then the contents of the struct.&lt;br /&gt;
&lt;br /&gt;
When we define structs though, we actually say what &amp;quot;protocols&amp;quot; the struct follows&lt;br /&gt;
  - essentially, what methods we are saying this struct will have&lt;br /&gt;
&lt;br /&gt;
Everything you put in a body of a View is another View, or helps produce a View&lt;br /&gt;
&lt;br /&gt;
Views are what make up a screen&lt;br /&gt;
 - everything you put on screen in SwiftUI fits into a view of some kind&lt;br /&gt;
 - and those views are often nested, potentially many deep&lt;br /&gt;
&lt;br /&gt;
And so there are many ways to combine views&lt;br /&gt;
&lt;br /&gt;
When you&amp;#039;re inside of the body of a View, regular Swift rules don&amp;#039;t always apply&lt;br /&gt;
 - you can&amp;#039;t just do regular loops&lt;br /&gt;
 - only so many views you can put in&lt;br /&gt;
 - many, many constraints&lt;br /&gt;
    - almost like a different programming language&lt;br /&gt;
    - actually, it is a domain-specific language for creating user interfaces&lt;br /&gt;
       - just implemented in Swift&lt;br /&gt;
&lt;br /&gt;
But if you&amp;#039;re inside of a function, then you can do all the normal Swift/general programming language stuff&lt;br /&gt;
 - you can call functions inside of a View body, but only in constrained ways&lt;br /&gt;
 - note that $&amp;#039;s are a SwiftUI thing, not a Swift thing&lt;br /&gt;
&lt;br /&gt;
analysis[analysisMode]!(t)  (line 16)&lt;br /&gt;
&lt;br /&gt;
analysis is a dictionary/hash table&lt;br /&gt;
 - maps strings to functions&lt;br /&gt;
 - so we give it a string, it returns a function, and then we call the function&lt;br /&gt;
 - the ! is there to unwrap - we&amp;#039;re guaranteeing the lookup in the hash&lt;br /&gt;
   table will succeed&lt;br /&gt;
&lt;br /&gt;
a hash table is an implementation of a dictionary&lt;br /&gt;
&lt;br /&gt;
Note the definition of a function type on line 55:&lt;br /&gt;
  (String) -&amp;gt; String&lt;br /&gt;
&lt;br /&gt;
So any function that takes a string as an argument and returns a string would&lt;br /&gt;
match this type&lt;br /&gt;
&lt;br /&gt;
We are treating functions as another kind of data that can be passed around&lt;br /&gt;
 - &amp;quot;first class functions&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The -&amp;gt; is used to declare the return value of a function&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
  func countUpper(_ s: String) -&amp;gt; String {&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  func         this is a function declaration!&lt;br /&gt;
  countUpper   the name of the function&lt;br /&gt;
  (            start of the arguments to the function&lt;br /&gt;
  _            you don&amp;#039;t need to name the next argument&lt;br /&gt;
  s            name of the first argument, can be used&lt;br /&gt;
               in the body of the function&lt;br /&gt;
  : String     the type of s&lt;br /&gt;
  )            end of argument list&lt;br /&gt;
  -&amp;gt;           function return value type comes next&lt;br /&gt;
  String       return value of the function&lt;br /&gt;
&lt;br /&gt;
By default, in Swift are function arguments must be named&lt;br /&gt;
  - in most other languages, the default is unnamed arguments&lt;br /&gt;
    (so we tell the difference between them based on the position&lt;br /&gt;
     in the argument list)&lt;br /&gt;
&lt;br /&gt;
in other languages&lt;br /&gt;
  call functions  with &amp;quot;f(a, b, c)&amp;quot;&lt;br /&gt;
  in f&amp;#039;s declaration, a =&amp;gt; firstarg, b =&amp;gt; secondarg, etc&lt;br /&gt;
&lt;br /&gt;
In swift, you can do the same, but you&amp;#039;d have to say&lt;br /&gt;
  func f(_ firstarg: String, _ secondarg: String, ...&lt;br /&gt;
&lt;br /&gt;
You specify all the potentially unnamed arguments then the ones that must be named.&lt;br /&gt;
&lt;br /&gt;
Often, we use unnamed arguments for arguments that must be passed in,&lt;br /&gt;
and named arguments for ones that can be optional (and thus have&lt;br /&gt;
default values).&lt;br /&gt;
&lt;br /&gt;
Note that when you use named function arguments, you can change their order&lt;br /&gt;
arbitrarily.  (So they are more verbose but potentially easier to use.)&lt;br /&gt;
&lt;br /&gt;
In analysis, &amp;quot;Upper Case&amp;quot; is defined as the key with the value being countUpper&lt;br /&gt;
(the function we defined previously)&lt;br /&gt;
&lt;br /&gt;
But &amp;quot;Count&amp;quot;&amp;#039;s value is this:&lt;br /&gt;
  {s in return String(s.count)}&lt;br /&gt;
&lt;br /&gt;
This is actually a function declaration!&lt;br /&gt;
  - but it is an anonymous function, i.e. a &amp;quot;closure&amp;quot; in Swift syntax&lt;br /&gt;
  - it is a function without a name, it is just a value&lt;br /&gt;
&lt;br /&gt;
Function is between {}&lt;br /&gt;
 - argument list comes before &amp;quot;in&amp;quot; keyword&lt;br /&gt;
 - body of function is afterwards&lt;br /&gt;
 - here, the body is just a return statement&lt;br /&gt;
&lt;br /&gt;
Closures actually show up everywhere in Swift&lt;br /&gt;
 - often anywhere you have { }&lt;br /&gt;
&lt;br /&gt;
You want a named function if you&amp;#039;re going to call it in multiple places&lt;br /&gt;
&lt;br /&gt;
But if you&amp;#039;re defining a function that will have only one reference in your code, why bother with a name?&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Soma</name></author>
	</entry>
</feed>