Introduction to the Pony programming language
opensource.com
Introduction to the Pony programming language
1–10 of 77 posts
Re: Introduction to the Pony programming language
#2In addition to being the submitter, I'm also the author and a member of the Pony core team. I'll check the comments here from time to time and answer what I can.
Re: Introduction to the Pony programming language
#3Hi all, In addition to being the submitter, I'm also the author and a member of the Pony core team. I'll check the comments here from time to time and answer what I can.
Re: Introduction to the Pony programming language
#4Hi all, In addition to being the submitter, I'm also the author and a member of the Pony core team. I'll check the comments here from time to time and answer what I can.
Hi spooneybarger. I'm curious: why is 1/0 == 0? Is it because there is no way to panic/kill the current actor with an error?
https://tutorial.ponylang.org/gotchas/divide-by-zero.html
I can elaborate a bit on what is in the tutorial. With the current semantics, you as the application programmer can check for division by zero and throw `error` if you want. Otherwise, every division operation would be partial which given that pony forces you to handle all partial functions, can get to be very painful.
We are working on adding value dependent types and will be revisiting the divide by 0 question. Some work was done on that for a thesis a couple years back but hasn't been integrated into Pony by the author as they have had time constraints since leaving school. You can check out a video about the work here: https://vimeo.com/175746403
It's definitely something that folks bring up. We aren't thrilled with the current functionality but feel its better than the previous functionality and are looking to slow improve the situation over time.
It can definitely bite the uninitiated if they aren't careful.
Re: Introduction to the Pony programming language
#5Would like to see a summary of what those tradeoffs are. Very curious!
Re: Introduction to the Pony programming language
#6Re: Introduction to the Pony programming language
#7Well, isn't that a zero content statement?
Sure, if you can't help in managing problems (and hard problems) the language is not that good.
But I'd argue a language succeeds or fails in helping you manage problems through its syntax, expressiveness, paradigms, models, and other attributes (like community size, lib ecosystem, tooling, speed, etc).
Re: Introduction to the Pony programming language
#8> Pony's reference capabilities and Rust's borrow checker both provide data safety; they just approach it in different ways and have different tradeoffs. Would like to see a summary of what those tradeoffs are. Very curious!
Both are difficult for folks just learn the languages to grasp. When I tried doing async programming in Rust, I found the borrow checker especially hard to deal with. Pony's reference capabilities, once you understand them, apply quite naturally to async code. This is important as most actions in Pony involve sending asynchronous messages between actors. There are certain patterns of passing around isolated regions of memory that are a pain in the ass to do in Pony that are very easy to do in Rust (once you know how to work with the borrow checker). It's something we are aware of on the Pony and are working to address.
Reference capabilities are part of the type of variables. This can make writing your own generics really hard unto you have a really good grasp of the type system and reference capabilities. It's the steepest learning curve in all of Pony.
Reference capabilities exist only at compile time but, something about how people think about them leads people to wanting to be able to match on them at runtime. I suspect this is something about how we teach them. It's a bit of a hurdle for some folks and can lead to some confusion early on.
Someone who has spent more time writing Rust and helping people learn Rust could come up with a similiar list. From time to time, Steve Klabnik and I have talked about similiarities in how problems folks have in learning the two languages.
I prefer reference capabilities to the borrow checker because reference capabilities more closely align with how I think about data safety.
Re: Introduction to the Pony programming language
#9Hi all, In addition to being the submitter, I'm also the author and a member of the Pony core team. I'll check the comments here from time to time and answer what I can.
Re: Introduction to the Pony programming language
#10Please consider putting some code snippets in the home page, I needed I don't know how many clicks to find a random code snippet to look at in the docs.