Pyret – A language exploring scripting and functional programming
1–10 of 272 posts
Re: Pyret – A language exploring scripting and functional programming
#2Re: Pyret – A language exploring scripting and functional programming
#3Scripting and functional go amazing together, as long as it's (mostly) dynamic typing. In general, types really just get in the way when scripting or prototyping or trying to do anything fast, especially when you don't know the types of data you're going to be working with ahead of time, e.g. when it comes from a file or from an external API, etc.
But what is BinTree in the following example on the website? Is it a type? Is it a function, or constructor, or what? I'm confused.
data BinTree:
| leaf
| node(value, left, right)
endRe: Pyret – A language exploring scripting and functional programming
#4Maybe Pyret isn't for beginners, and it's intended to teach people who already have some basic knowledge more advanced concepts like functional programming. That's fine.
But to a total beginner, the syntax of Pyret is definitely a step back in terms of readability.
In what world is:
fun square(n :: Number) -> Number:
n * n
end
...easier for a beginner to understand than: def square(n):
return n * n
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's ability to understand and keep track of lots of new concepts when they're just starting out.Re: Pyret – A language exploring scripting and functional programming
#5It has all the basic constructs of both functional and object oriented programming in plain english without a bunch of syntax to worry about. I personally think it's the most readable language. it's also quite intuitive imo. Lastly, there's a fantastic community and instant help is available for all skill levels but especially beginners on #python on freenode irc
Pyret... isnt very readable, doesnt seem very intuitive, has somewhat odd syntax, and generally seems like a terrible choice for learning. Doubt it has the resources quality python has (community, docs, tutorials)
i dont get it.
Re: Pyret – A language exploring scripting and functional programming
#6Well not really, we need better teachers and methods for teaching programming and computing. A good language on its own is not gonna lift the interest.
Re: Pyret – A language exploring scripting and functional programming
#7So, as someone without too much experience in language development, the concept of having unit tests being an extension of the functions themselves seems very interesting. Clearly this doesn't work for all scenarios—multiple functions interacting, any sort of GUI interaction—but that's a very intriguing concept.
Re: Pyret – A language exploring scripting and functional programming
#8> "while exploring the confluence of scripting and functional programming" Scripting and functional go amazing together, as long as it's (mostly) dynamic typing. In general, types really just get in the way when scripting or prototyping or trying to do anything fast, especially when you don't know the types of data you're going to be working with ahead of time, e.g. when it comes from a file or from an external API,…
Re: Pyret – A language exploring scripting and functional programming
#9So, as someone without too much experience in language development, the concept of having unit tests being an extension of the functions themselves seems very interesting. Clearly this doesn't work for all scenarios—multiple functions interacting, any sort of GUI interaction—but that's a very intriguing concept.
Re: Pyret – A language exploring scripting and functional programming
#10Also, try code samples in here: https://code.pyret.org/editor
Also, scroll down to see the comparison vs other languages: http://www.pyret.org/#examples