News for hackers. Stuff that matters.
Re:The Unison language by vidarh on Friday January 10, 2020 @09:44AM (#22011225)
Syntax stops me from even considering some languages, because to a lot of us it is important. I spend most of working hours reading code; as a result how easy it is to read is important not just for my productivity, but for my overall happiness in life.

A small sample on the front page will not tell me if a language is good enough, but it can give me an idea if it's worth spending more time reading up on it or not.

Re:The Unison language by rixed on Monday January 13, 2020 @03:07AM (#22032696)
What makes a program easy to read is not its syntax but its semantic, that dictates how much context one has to keep in mind to be able to understand a small fraction of code.

For instance, C and Go are easy because they do not hide anything and what one sees is pretty much unaffected by what one does not see. On the other hand, because those languages do not permit to build efficient abstractions they are also harder to read because each given sample, although unambiguous, perform very little.

Other languages like C++ (despite a syntax that is close to that of C) or Haskell, allow the behavior of the simplest operators, including the application and the sequencing operators, to behave in unfamiliar way or hide subtle but meaningful details, which makes understanding any small bit of code like a gamble (one has to assume some behavior for operators, constructors...). On the other hand, they allow to build abstractions that make programs more terse and therefore easier to read.

In this trade of, none of the alternatives depends significantly on the syntax.

I think a lot of people have associated obscure syntax with bad programming experience because of perl, the language which syntax became synonymous for bad. Indeed, this is a case where the syntax can be teacherous, but still the language is made more problematic by its semantic, that tries hard to give a meaning to any use of any variable in any context, this delaying runtime errors even more than other runtime typed languages and even masking them entirely (then performing something else than intended).

I think this mental association must be done away with.

Re:The Unison language by setr on Friday January 10, 2020 @10:30AM (#22011621)
The problem is that readability is largely a matter of naming conventions, organization, and adherence to known patterns. The language becomes more readable as you use it. Anything that isn't a C derivative is unreadable if you only know C.

There are of course actual blockers to readability, like usage of similar-looking sigils and poor system library naming, but otherwise the syntax really doesn't tell you any useful information. It's the semantics that tell you how it'll all fall apart

Re:The Unison language by vidarh on Friday January 10, 2020 @10:48AM (#22011762)
I couldn't disagree more. Syntax changes whether I can look at a page of code and get an idea of structure and which elements to focus attention on, or whether I need to read everything in detail.

It doesn't matter that much when I have found a piece of code that I need to read and understand every detail of, but that is a tiny proportion of the amount of code reading I do - most of the time reading code is about grasping overall structure to learn a codebase well enough to find the points you need to focus on and read.

A clean syntax makes the difference between always having to read each token vs. being able to speed-read by pattern matching high level structure when you don't need the details of that specific piece of code.

I've worked with dozens of languages, with wildly differing syntax, and I'll say that once you reach a certain base capability-level, syntax matters more to me than semantics.

You can paper over a lot of semantic difference.

I can (and have, and so have many others) build libraries to do object-oriented programming in C, for example, and I have implemented closures in C too [1]. So the reason I don't do much C any more is not semantics, but that there is no mechanism for plugging those semantic gaps that creates readable code.

There are languages where the semantics paints you into a corner and makes plugging the holes too hard, so it's not that semantics doesn't matter at all. But it's usually easier to paper over semantic gaps than unreadable syntax.

[1] http://hokstad.com/how-to-implement-closures

Re:The Unison language by elcomet on Friday January 10, 2020 @09:59AM (#22011352)
Syntax is something you become used to in a few hours. But it's not what's the most important and will make your time more efficient in the end.
Re:The Unison language by frenchyatwork on Friday January 10, 2020 @01:25PM (#22013458)
2000 years ago, they didn't have spaces or punctuation in writing. We could try dropping them again, and people would adjust after a few hours, but that doesn't mean that the spaces and punctuation don't provide value.
Re:The Unison language by vidarh on Friday January 10, 2020 @10:30AM (#22011622)
Maybe you do. I don't. Syntax is something that has a substantial impact on how I think and work. Presentation overall matters immensely.
Re:The Unison language by antisthenes on Friday January 10, 2020 @10:21AM (#22011550)
> Syntax is something you become used to in a few hours.

This is completely subjective and not at all universal.