Answers.Body: <p>I think the answer to that depends on how you're structuring the course overall, and what Kotlin brings to the teaching of those ideas.  I know of three distinct approaches to an upper-division PL course:  the "paradigms" curriculum (à la Sebesta's book), the "interperter/design space" curriculum (EOPL, Scott's "Programming Language Pragmatics", Louden, Turbak/Gifford/Sheldon, etc.), and the hybrid theory/implementation curricula (less common and few things in print: the Racket team, Norman Ramsey's adaptation-in-progress of Samuael Kamin's book).</p>
  
  <p>Do any of these describe what you're doing with your course?  What is it that Kotlin brings to the class that is not already represented by the other three functional languages your students have learned?</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-04-24T03:48:52.990Z
Answers.Text: Thank you. I'll update my question.
Answers.UserDisplayName: Ellen Spertus
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-04-24T03:29:46.243Z
Answers.LastActivityDate: 2019-04-24T03:29:46.243Z
Answers.UserDisplayName: JLasseter
Answers.Body: <p>Just free associating here, actually. The single session of 75 minutes is awfully short to actually have you do anything and <em>then</em> have the students learn anything. So....</p>
  
  <p>First, flip the classroom for that session even if you don't generally. Give them a week (more or less???) to study Kotlin on their own, so that they have some sense about its syntax and main features. You may have to give them an outline of what to focus on. </p>
  
  <p>For the single session, have them build a stateless server for some simple app using Kotlin in small groups, even pairs. Making it stateless lets you more easily stress the FP aspects (I think, but haven't actually tried it). Note: still thinking about the stateless part. Think about sending them something the evening before the session to get them thinking about what is coming. Not a spec, though, since some will try to do too much beforehand. </p>
  
  <p>One possibility that will help speed up the day's work is to send them a skeleton application the night before. The task of the class will be to extend the skeleton to something useful. I would probably do that if it were my class, actually. </p>
  
  <p>Use the last quarter hour for a retrospective on what they learned and point them toward the future. </p>
  
  <p>I don't know if this would be successful. It might fail. It might require modification for a future use. Owen Astrachan at Duke as advocated that some small percentage of what you do in a course <em>should</em> be experimental so that you can learn more about what works and what doesn't. But be prepared for it to fail so that students can learn even from failure. </p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-04-24T13:13:03.800Z
Answers.LastActivityDate: 2019-04-24T16:26:18.017Z
Answers.LastEditDate: 2019-04-24T16:26:18.017Z
Answers.UserDisplayName: Buffy
Answers.Body: <p>What I ended up doing (partly because I didn't have much prep time for me or the students) was using the class period to have pairs of students work together through <a href="https://play.kotlinlang.org/koans/overview" rel="nofollow noreferrer">Kotlin Koans</a>. I walked around pointing out similarities to and differences from other languages we studied.</p>
  
  <p>The advantage of this approach was that students got to actively learn parts of the language. The major disadvantages were not providing the history and not ensuring that all important concepts were introduced. I plan to do those in a subsequent lecture, if time permits.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-04-27T20:27:37.007Z
Answers.LastActivityDate: 2019-04-27T20:27:37.007Z
Answers.UserDisplayName: Ellen Spertus
Body: <p>I'm teaching an upper-division college Programming Languages course, in which students have learned some Scheme, Haskell, and Go. Students' strongest language is Java, which we use in most of our courses. I have a free 75-minute lecture period. Any recommendations how to use that time? I can have the students bring their laptops.</p>
  
  <p>My reasons for wanting to introduce Kotlin are:</p>
  
  <ul>
  <li>Showing how the functional programming has been added onto an imperative object-oriented language they know well.</li>
  <li>Showing them how Kotlin uses a stripped down version of Java's syntax without losing expressiveness.</li>
  <li>Augmenting what they are learning in another class of mine, in which they are learning to program Android in Java. (That's why I chose Kotlin rather than Scala.)</li>
  </ul>
  
Tags: <introductory-lesson><functional-programming><kotlin>
Title: How to introduce Kotlin in a Programming Languages course
ThreadText: # How to introduce Kotlin in a Programming Languages course
  
  (Asked by: username_0 on 2019-04-24)
  
  I'm teaching an upper-division college Programming Languages course, in which students have learned some Scheme, Haskell, and Go. Students' strongest language is Java, which we use in most of our courses. I have a free 75-minute lecture period. Any recommendations how to use that time? I can have the students bring their laptops.
  
  My reasons for wanting to introduce Kotlin are:
  
  * Showing how the functional programming has been added onto an imperative object-oriented language they know well.
  * Showing them how Kotlin uses a stripped down version of Java's syntax without losing expressiveness.
  * Augmenting what they are learning in another class of mine, in which they are learning to program Android in Java. (That's why I chose Kotlin rather than Scala.)
  
  **Tags:** introductory-lesson, functional-programming, kotlin
  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_1 on 2019-04-24. Score: 3
  
  I think the answer to that depends on how you're structuring the course overall, and what Kotlin brings to the teaching of those ideas. I know of three distinct approaches to an upper-division PL course: the "paradigms" curriculum (à la Sebesta's book), the "interperter/design space" curriculum (EOPL, Scott's "Programming Language Pragmatics", Louden, Turbak/Gifford/Sheldon, etc.), and the hybrid theory/implementation curricula (less common and few things in print: the Racket team, Norman Ramsey's adaptation-in-progress of Samuael Kamin's book).
  
  Do any of these describe what you're doing with your course? What is it that Kotlin brings to the class that is not already represented by the other three functional languages your students have learned?
  
  > **Comments:**
  > **username_0**: Thank you. I'll update my question.  
  
  ---
  
  ### Answer by username_2 on 2019-04-24. Score: 2
  
  Just free associating here, actually. The single session of 75 minutes is awfully short to actually have you do anything and *then* have the students learn anything. So....
  
  First, flip the classroom for that session even if you don't generally. Give them a week (more or less???) to study Kotlin on their own, so that they have some sense about its syntax and main features. You may have to give them an outline of what to focus on.
  
  For the single session, have them build a stateless server for some simple app using Kotlin in small groups, even pairs. Making it stateless lets you more easily stress the FP aspects (I think, but haven't actually tried it). Note: still thinking about the stateless part. Think about sending them something the evening before the session to get them thinking about what is coming. Not a spec, though, since some will try to do too much beforehand.
  
  One possibility that will help speed up the day's work is to send them a skeleton application the night before. The task of the class will be to extend the skeleton to something useful. I would probably do that if it were my class, actually.
  
  Use the last quarter hour for a retrospective on what they learned and point them toward the future.
  
  I don't know if this would be successful. It might fail. It might require modification for a future use. Owen Astrachan at Duke as advocated that some small percentage of what you do in a course *should* be experimental so that you can learn more about what works and what doesn't. But be prepared for it to fail so that students can learn even from failure.
  
  
  ---
  
  ### Answer by username_0 on 2019-04-27. Score: 2
  
  What I ended up doing (partly because I didn't have much prep time for me or the students) was using the class period to have pairs of students work together through [Kotlin Koans](https://play.kotlinlang.org/koans/overview). I walked around pointing out similarities to and differences from other languages we studied.
  
  The advantage of this approach was that students got to actively learn parts of the language. The major disadvantages were not providing the history and not ensuring that all important concepts were introduced. I plan to do those in a subsequent lecture, if time permits.
  
  
  ---
  
  