Skip to content

Conversation

@julienrf
Copy link

@julienrf julienrf commented Jun 23, 2022

We introduce a new page about the usage of Scala as a tool to teach programming. This page is available from a link in the front page. We also publish a blog article about the new page (and the community of teachers).

New page:

Screenshot 2022-07-18 at 17-19-06 Teach


Link in the front page:

Screenshot from 2022-07-18 17-18-28

(code examples use Scala 3, which is not consistent with the other code examples of the “Scala in a Nutshell” section, but that will be separate work)


Blog article:

Screenshot 2022-07-18 at 17-22-35 Teach Programming with Scala

@julienrf julienrf requested review from bishabosha and sjrd July 18, 2022 15:25
</div>

<div class="code-element">
<div class="bar-code"><span>Modules.scala</span></div>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what this example is supposed to highlight. In what programming language can we not do this? Or even not do it as easily as in Scala? (except perhaps C)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I initially wrote something that was using abstract methods and abstract type members, but I thought maybe a simpler example would also work…
Indeed, working with classes as shown in that example is not outstanding, but my idea was just to show that it’s simple. The same in Java would be much more complicated…

class DatabaseAccess {

  private final Connection connection;

  public DatabaseAccess(Connection connection) {
    this.connection = connection;
  }

  public List<Data> readData() { ... }

}

class HttpServer {

  private final DatabaseAccess databaseAccess;

  public HttpServer(DatabaseAccess databaseAccess) {
    this.databaseAccess = databaseAccess;
  }

}

(or maybe we can do it in a simpler way in Java?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not more complicated in Java. It's only more verbose, because transferring constructor parameters to fields requires some code. But that has nothing to do with "modules". It's just the regular verbosity of a Java class.

Copy link
Author

@julienrf julienrf Jul 20, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, so maybe “more complicated” was not the right wording, what about “less readable”?

Do you think we should show something more spectacular? Or is it okay to go with this straightforward example?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want to talk about modules, then I think we would need something more "spectacular". But it doesn't need to be about modules. It can be an example about "no boilerplate" (perhaps also showing a val field).

@@ -0,0 +1,83 @@
---
shortTitle: "Ideal for teaching"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The nature of this item (a use case of the language) is very different from the others items (language features). That does not look good to me.

I would not recommend to merge it, except if we have a clear idea on what other items we want and what is the timeline to make these changes. But this probably needs some thinking and discussion. Personally I think we should keep promoting some language features in the front page. So I would move "Scala for teaching" somewhere else.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will update the other items at some point. Hopefully before the end of the summer. The goal of this section is to give highlights on why we think Scala is interesting. So far, that section focused on language features, but we would like to make it more use-case oriented.

includeTOC: true
---

# Scala is a great tool to teach programming
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a suggestion but maybe you could add somewhere that Scala was designed by Martin Odersky, professor of Computer Science, and that he has used this language to teach programming since 20??

Scala is more than a great programming language for building software.
It is also a great tool for teaching programming!

We are happy to announce that we have published a [new page][teach] on the
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice to have a "Teach" link in the main nav bar of the site.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe, but I am not sure yet, so I would rather add it later.

@julienrf
Copy link
Author

Thank you for your feedback! I will open a PR on scala/scala-lang.

@julienrf julienrf closed this Jul 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants