Roc was on hacker news front page earlier this week. I clicked around the website and red the introductory sections of it. Here's some feedback:
Informative and clean website with a clear focus on informing the visitor and nothing else. Although a few important information points are still missing (read on).
I love that the claims of fast, friendly and functional are one click away from further motivation, but these sections are a bit too long and detailed for a first time visitor, which realistically is those who that information is for. Perhaps restructure things a little bit. Maybe a shorter explanation of what these things mean, with links to more detailed documentation pages
Personally I know a bit the context of this language and I am into functional programming. But I noticed many people are asking "What is the purpose of this language". Perhaps the one short sentence in the front page is too little. Maybe a small paragraph or a longer sentence? python, ruby, php, elixir, ocaml (I just checked these) all have a better quick answer to "what is this?" Roc's feel more like a slogan rather than a description.
Good job explaining clearly what the advantages and drawbacks of functional program. Best and most practical comparison I have seen.
I like that you provide code samples with examples of common tasks. This is what people want. A web app.... check, reading and writing to io... check. I would suggest a an example of concurrency, perhaps a thread pool?
You got it right when it comes to syntax. It immediately became one of my favorite languages. Doing away with parens and all sorts of special characters is obviously where ergonomy is at. This language is realy easy to pick up and a joy to write and memorize basic syntax.
I red the page about platforms but didn't get exactly what they are. It starts by stating why they exist and jumps into an example without any explanation of what they are. I think this needs improvement. I figure they are something about how io is managed/performed, but as a language user, I am primarily concerned with what they are, taher than how to implement one".
[Opinionated] The ramble about how Roc doesn't have an Any type and therefore cannot support unsafe JSON parsing like python does seems rather silly to me. Not being able to do something potentially unsafe is not a feature. And it's not even true, of course one could create a library that parses json like python json module. One would just have a to define an Any type manually and an access mechanism. In fact google's Gson java library does exactly this. Please re-consider this dogma. There is nothing wrong with easy means to quickly extract a value deeply nested in JSON (or other serialization format). Type safe parsing has the advantages we all know but the claim that it is the only way, is for the birds. I think this was a dogmatic example of 'friendliness'.
[Opinionated] Consider the 'batteries included' principle and embrace it. People want languages that let you do things quickly. If an useful library is in the language distribution, its expected stability and reliability will inspire much more trust and confidence. The challenge has always been finding the right balance between usefulness and bloat. Perl came with a regex library in its core and became popular because of that. PHP included mysql drives, a template system and an HTTP request parser in its core and took the world of web development by storm. Erlang is a concurrency system with a language on top of it, and that it is still its value offer to this day. Personally, if a language offers me these things, I will use it. If i need to spend time shopping around for third party libraries, I become skeptical.
Hope you can make something useful our of this post. Just my first impressions. Most important: keep up the good work.
Yeah, platforms are definitely complex to explain the depth of to new users without going too into depth. They also are really where most things "batteries included" are likely to come from.
Yeah, platforms are definitely complex to explain the depth of to new users without going too into depth. They also are really where most things "batteries included" are likely to come from.
Maybe that point should be emphasised? A lot of what would otherwise be in a library exists in the platform, so it seems a problem if people don't recognise that quickly.
I watched the video when Richard talks about the borders of programming languages and applications, and got a clearer idea. From what I gather, essentially Roc has no IO and all IO and external state has to be managed/performed in a platform, which just exposes an interface to it. I take it it is not easy, but I do think an effort should be made to explain it more succinctly and more in laymen terms. A link could be added at the end to read about it in more detail. And perhaps a quick tutorial on writing one.
@Anton Yes, where @Richard Feldman says. Noticed that I put a Opinionated warning.
Here is the quote:
Unfortunately, if there's any mismatch between the way that returned value ends up being used and the runtime shape of the JSON, it can result in errors that are time-consuming to debug because they are distant from (and may appear unrelated to) the JSON decoding where the problem originated. Since Roc has a sound type system, it does not have an any type, and cannot support this technique.
This is the old discussion of enforcing, rather than providing, type safety.
I believe I put it a bit too specific... sorry. I don't have a specific reference. Perhaps Guido Van Rossum's justification why python will always be dynamically typed. He has touched that topic a few times.
In my opinion it is a mater of balancing convenience vs correctness. It's not so much about which is better.
Sometimes it's fine and useful to do this. And it always be quick to do. If this should be done or not, is something to do with a task at hand, rather than programming language design. Just my opinion anyways
thanks for explaining your perspective! I think it's a safe bet that others have the same perspective, and I understand why that aspect of Roc's design might not make a first impression of friendliness :big_smile: