Remix.run Logo
Timwi 4 days ago

Honestly, I get it. The document wants to tell you what's new and different under the hood, not what the language looks like superficially. Code examples don't actually tell you what the language feels like in production. It's kinda like judging a person's character by how they dress.

I would be torn if I had to write intro documentation like this. On the one hand, people demand code examples, but on the other hand, the majority of people reading code examples will nitpick minor pet peeves in the syntax and completely detract from the actual new ideas and concepts that go way beyond just the syntax.

I found the descriptions of the concepts very enlightening and I honestly think they gave me a better idea of what the language would “feel like” to program in than a code example (or a description of the syntax) would have.

In theory, syntax should be interchangeable. It's conceivable to parse a syntax into an AST and reexpress it in another syntax without changing the AST. In practice, this is not done for many reasons (incl. tooling like diffs) but a big reason is that individual bits and bobs of the syntax are tied to the new concepts in subtle ways. There could absolutely be multiple syntaxes for the same concept, but if the concept is new, even in small and unobvious ways, then no prior existing language’s syntax will map it exactly. For this reason, a code example can't really express the new concept, especially if the syntax is superficially similar to another language that doesn't actually have that concept.

notfed 4 days ago | parent | next [-]

> people reading code examples will nitpick minor pet peeves in the syntax and completely detract from the actual news ideas and concepts

Err, ok, so? Don't be so afraid of criticism, I guess? Yeah, some people will nitpick. I don't see the problem.

johnisgood 4 days ago | parent [-]

I think the emphasis should be on "nitpick" and "detract". Syntax is important, but they want people to focus on the fundamental or underlying concepts instead of the syntax first. With regarding taking criticisms: I think the person posting this submission may not be associated with the language to begin with. I wonder if any Pony developers are even reading it. Just my 2 cents.

gr4vityWall 4 days ago | parent | prev | next [-]

> the majority of people reading code examples will nitpick minor pet peeves in the syntax and completely detract from the actual new ideas and concepts that go way beyond just the syntax

I believe that, regardless of our personal preferences, the reality is that syntax is a major criteria for adopting a programming language.

Some people have trouble following Lisp code, and won't touch your project if it looks like chat. Others will have the opposite reaction and have their interest captured instead.

cestith 4 days ago | parent [-]

Likewise, some people love the ABC and Python model of syntactically important leading whitespace while others passionately prefer some sort of brackets (for this purpose brackets include parentheses, curly braces, square brackets, words like BEGIN and END, etc).

Some love short, mnemonic built-in variables and short built-in function names of the sort you see in APL or Perl (although Perl has longer-named versions optionally for a lot of things). Others love long, self-documenting names for keywords and functions. They might want no built-in variables at all.

Lutger 4 days ago | parent | prev | next [-]

In a way, leading with the core ideas and not with the syntax also shows what this language is about, and selects for people who are more interested in the PL concepts than its looks. After all, syntax is the bikeshed of programming language.

voidUpdate 4 days ago | parent | prev | next [-]

On the homepage, just move the descriptions to the left a bit, and put a big block on the right side where there is some example code that shows off the concepts a bit. It's not like they're struggling for space

archerx 4 days ago | parent | prev [-]

Yea but the syntax looks like a mix of Python and JavaScript. By just seeing that I know I don’t want to use it, by seeing the code up front I know that I don’t want to keep reading what ever rationalizations they have to justify the existence of this language.

So by seeing the syntax up front I can save a lot of time because in a world where there are many languages that do the same thing it really boils down to using the one with the syntax that you like the most.

swiftcoder 4 days ago | parent [-]

> in a world where there are many languages that do the same thing it really boils down to using the one with the syntax that you like the most

Wat? If all languages were just syntax re-skinning, we really wouldn't need more than one compiler backend...

Generally the semantic differences are much more important. Rust isn't interesting for its syntax, it's interesting for its ownership rules and borrow checker. Erlang isn't interesting because of its syntax, it's interesting for its actor model concurrency. And so on...

norir 4 days ago | parent | next [-]

I agree and disagree completely with this statement. Syntax is superficial. It is the first thing that people will notice about the language (unless you hide it from them). One quickly notices that if you don't like a language syntax, you can always write a compiler that operates at a purely syntactic level to transform your desired syntax to the actual target language.

But just because syntax is superficial doesn't mean that it isn't important. If a language has such poor syntax that I feel the need to write my own compiler to work around its syntax, I have to seriously question the skills and/or motivations of the author. If I am capable of writing a compiler at the syntactic level, why not just go all in and write my own compiler that implements _my_ desired semantics? A language that I find subjectively distasteful at the syntactic level is nearly guaranteed to be filled with semantic and architectural decisions that I also dislike. Consider Rust, I do not think that its syntax and abysmal compilation times can be decoupled. I would rather write my own borrow checker than subject myself to writing rust. And the reason is not the syntax, which I do strongly dislike, but the semantic properties of the language, such as horrible compilation times and compiler bugs (if a language has more than 100 open issues on github, I consider it broken beyond repair).

archerx 4 days ago | parent | prev [-]

You say that but I will never use Rust because of it's awful syntax, I'll stick with C/C++ and be happy and not miss out on anything. I don't know much about erlang so I have no comments on it.

whytevuhuni 4 days ago | parent | next [-]

> I will never use Rust because of it's awful syntax, I'll stick with C/C++

Oh, that's very interesting. Rust tried to match C++'s syntax as much as possible.

Which parts do you find awful? Lifetimes and trait bounds?

swiftcoder 4 days ago | parent | prev [-]

> and not miss out on anything

I mean, you do you. No one is judging. The fact remains that Rust exists primarily because there are some features that C++ cannot reasonably provide

pjmlp 4 days ago | parent | next [-]

It could eventually provide some, if Safe C++ (nee Circle) proposal had gotten a warm welcome by the WG21 committee unfortunately they rather go with the mythical profiles approach.

Not only didn't they made it into C++26, it isn't clear what could land in C++29, this ignoring the assumptions regarding capabilities that static analysers are yet to provide nowadays.

archerx 2 days ago | parent | prev [-]

Rust exist because people have skill issues. Same deal with typescript.