<story><title>Pyret – A language exploring scripting and functional programming</title><url>http://www.pyret.org/</url></story><parent_chain><item><author>mattangriffel</author><text>As someone who teaches coding to beginners for a living (I founded One Month and I teach Python to business students at Columbia University), this language looks really intimidating to beginners.&lt;p&gt;Maybe Pyret isn&amp;#x27;t for beginners, and it&amp;#x27;s intended to teach people who already have some basic knowledge more advanced concepts like functional programming. That&amp;#x27;s fine.&lt;p&gt;But to a total beginner, the syntax of Pyret is definitely a step back in terms of readability.&lt;p&gt;In what world is:&lt;p&gt;&lt;pre&gt;&lt;code&gt;  fun square(n :: Number) -&amp;gt; Number:
    n * n
  end
&lt;/code&gt;&lt;/pre&gt;
...easier for a beginner to understand than:&lt;p&gt;&lt;pre&gt;&lt;code&gt;  def square(n):
    return n * n
&lt;/code&gt;&lt;/pre&gt;
I get that the intention of this language seems to be to help beginners avoid some of the more common pitfalls that they may run into (ex. unexpected parameters and return values), but it seems like they do it at the expense of the total beginner&amp;#x27;s ability to understand and keep track of lots of new concepts when they&amp;#x27;re just starting out.</text></item></parent_chain><comment><author>adjkant</author><text>Pyret is inspired from Racket, which starts at step 1 with functional programming. It&amp;#x27;s not about readability or getting people to learn as fast as possible to write basic code, but to try and teach core program design principles easily and build a solid base within a single semester. The syntax is not as clean as Python, but it offers much more clarity in terms of testing, signatures, and offers a very interesting method of writing loops with map&amp;#x2F;filter&amp;#x2F;foldr.&lt;p&gt;I have a bias here, as I help teach an introductory course using DrRacket, and many of my colleagues are very aware of Pyret, some even helping to develop it. In one semester, however, we have students with a full understanding of recursion, linked lists, many other common data structures, anonymous functions, functions as data, and understanding of map&amp;#x2F;filter&amp;#x2F;fold and how to use them. The class is specifically aimed at people who do not have prior programming skills, and works very well in my experience. Yes, it is a lot, but it builds an incredible base, and if taught to build on itself slowly, is actually very minimal conceptually. The optional features in Pyret are probably allowed with that in mind.&lt;p&gt;One of its weaknesses, arguably, is that it doesn&amp;#x27;t look like much else out there in common use, since it&amp;#x27;s a Scheme. This syntax is an attempt to try and make the same ideas translate to other languages easier, such as Python&amp;#x2F;Java.</text></comment>
<story><title>Pyret – A language exploring scripting and functional programming</title><url>http://www.pyret.org/</url></story><parent_chain><item><author>mattangriffel</author><text>As someone who teaches coding to beginners for a living (I founded One Month and I teach Python to business students at Columbia University), this language looks really intimidating to beginners.&lt;p&gt;Maybe Pyret isn&amp;#x27;t for beginners, and it&amp;#x27;s intended to teach people who already have some basic knowledge more advanced concepts like functional programming. That&amp;#x27;s fine.&lt;p&gt;But to a total beginner, the syntax of Pyret is definitely a step back in terms of readability.&lt;p&gt;In what world is:&lt;p&gt;&lt;pre&gt;&lt;code&gt;  fun square(n :: Number) -&amp;gt; Number:
    n * n
  end
&lt;/code&gt;&lt;/pre&gt;
...easier for a beginner to understand than:&lt;p&gt;&lt;pre&gt;&lt;code&gt;  def square(n):
    return n * n
&lt;/code&gt;&lt;/pre&gt;
I get that the intention of this language seems to be to help beginners avoid some of the more common pitfalls that they may run into (ex. unexpected parameters and return values), but it seems like they do it at the expense of the total beginner&amp;#x27;s ability to understand and keep track of lots of new concepts when they&amp;#x27;re just starting out.</text></item></parent_chain><comment><author>makmanalp</author><text>Annotations are optional. This is equally valid:&lt;p&gt;&lt;pre&gt;&lt;code&gt;  fun square(n):
    n * n
  end
&lt;/code&gt;&lt;/pre&gt;
Not that different after all! And I say this as a lover of python and significant whitespace, but not having it at first would be easier.</text></comment>