These are chat archives for evhub/coconut

15th
Aug 2017
ShalokShalom
@ShalokShalom
Aug 15 2017 18:33
is Coconut suitable for programming newbies?
Evan Hubinger
@evhub
Aug 15 2017 20:31
@ShalokShalom The only issue in using Coconut without any prior Python experience is that there's no Coconut-specific tutorial for the basic syntax stuff that Coconut inherits from Python. That being said, if you just go through any Python tutorial, using Coconut instead of Python, you should do fine! So, I'd recommend going through the Coconut tutorial until you get to the point where you have everything installed and have written your "hello world" program, then switch to a Python tutorial to learn the basics, then after you can switch back to the Coconut tutorial. See "I don’t know Python very well, should I still learn Coconut?" for the FAQ entry on this question.
Tobias Ammann
@betabrain
Aug 15 2017 20:45
@evhub How did you decide what kind to pattern matching to support? After all, there are many ways to do it, from very simple to full on Prolog style unification. Performance considerations? A specific algorithm?
Evan Hubinger
@evhub
Aug 15 2017 23:52
@betabrain Coconut's pattern-matching syntax is loosely inspired by Haskell and patterns.py, but really the main goal is just to make it look as much like standard Python as possible. If you want to look at all the different constructs, Coconut's documentation has a complete syntactic specification of pattern-matching. Pattern-matching is also an area in which Coconut is regularly adding new features, such as #267 and #256 which will be coming out in the v1.3.0 release. If you have any ideas for new pattern-matching constructs you'd like to see Coconut support, definitely say so!