News for hackers. Stuff that matters.
Re:The Unison language by dudul on Friday January 10, 2020 @09:09AM (#22010980)
How can you tell the elegance or gotchas from a 6 line Hello World?
Re:The Unison language by giancarlostoro on Friday January 10, 2020 @09:21AM (#22011067)
It's how I picked my favorite Python web framework, I compared all the hello world samples they all had, and wound up with CherryPy. The rest had too many decorators and it just looked silly to me.

You can also figure out if it's C-like or Lisp-like, and so on from looking at syntax.

Re:The Unison language by rixed on Monday January 13, 2020 @03:09AM (#22032708)
From what you describe, sounds to me you picked your framework mostly at random, like one would pick a car for its color.
Re:The Unison language by neurobashing on Friday January 10, 2020 @09:26AM (#22011094)
you can infer a lot; is it LISPy, is it C-ish, or one of the Haskell family, etc. I think you can tell a lot from just which family of syntax.
Re:The Unison language by cttet on Friday January 10, 2020 @10:10AM (#22011442)
No, take Reason as an example: it is basically Ocaml. Despite having a C-like syntax, it is quite different from it. The syntax barrier is usually much smaller than the language itself.
Re:The Unison language by CarlRJ on Friday January 10, 2020 @11:29AM (#22012116)
And yet... someone trying to “sell” me a language while seemingly refusing to show me any code samples feels like someone trying to sell me a car based entirely on a spec sheet with no pictures and without actually seeing, touching or experiencing the car. They both provoke a reaction of suspicion - “what are they trying to hide?” As if they don’t trust me, the customer, to be able to understand the very thing they want/expect me to buy.

I’m perfectly fine with a page that says, “here’s a code sample - notice that it looks similar to C, but here’s a list of reasons / an explanation of why/how it’s actually quite different from C.”

One of my favorite programming books of all time is K&R, from back before ANSI, even. It said, “here’s a simple problem to solve, and here’s how you solve it in our language.” Repeatedly. Explaining how the features helped to solve the problem at hand. It was revelatory. And it assumed its audience to be knowledgeable programmers. It didn’t spend the first chapter just describing all the features or how great the language is without showing any code.

Re:The Unison language by thesz on Friday January 10, 2020 @09:28AM (#22011118)
For many programming languages the line count of "hello, world!" program is exactly one.

So you can deduce something just from a line count of simple program alone - for one such deduction is an answer to a question "are there at least some attempts to provide useful defaults?"

Re:The Unison language by chhickman on Friday January 10, 2020 @09:33AM (#22011148)
I agree that a Hello World is fairly useless example for anyone already familiar with programming languages. Perhaps something like a Fibonacci function should be the de facto short syntax example, as is common in functional languages. More useful though would be to have an example of how composition data structures work in the language - standard example could be a binary tree.