top | item 37158633

(no title)

kalekold | 2 years ago

Rob Pike was right: "features were being added by taking them from one language and adding it to another" "...and I realised all of these languages are turning into the same language." "we don't want one tool, we want a set of tools, each best at one task"

https://www.youtube.com/watch?v=rFejpH_tAHM

discuss

order

threatofrain|2 years ago

Dart's reason for existing is as a cross-platform GUI language via Flutter. It's not obvious that adding on some language ergonomics detracts or adds to that goal in a fundamental way.

Sometimes languages converge because of informal consensus that something is a good idea. Maybe Go adding generics is a good idea, even if it's a step in the direction of following trends.

Either way, most languages don't have syntax which is significantly challenging or easy (with exceptions like Rust), and it's the ecosystem which makes the language so productive. So whether or not Go added generics today or a decade ago, Go was still great anyway thanks to its standard library and ecosystem.

DrScientist|2 years ago

I don't know who is was - but somebody once said code is typically written once and read many times.

ie what matters is not the number of characters you have to type, but how easy the resulting code is to understand.

And here there are two factors - the verbosity and the conceptual load.

I think the mistake some language geeks forget is the importance of the conceptual load- the language surface area/complexity - and they tend to focus on brevity at the expense of conceptual complexity.

Cthulhu_|2 years ago

This is one reason why I love Go, in that it doesn't follow.

I've been primarily doing Javascript and the like for the past decade, and while I appreciate new features like functional operations added to the standard library - although that was a long process - and arrow functions, I lost it when they added object-oriented structuring like classes, but only half an implementation because there wasn't any good access modifiers. And they added OOP before they added modules and imports. I don't understand.

kaba0|2 years ago

JS has been OOP since the beginnings, one might even argue that prototype-based inheritance is the real deal compared to classes.

pjmlp|2 years ago

JavaScript like SELF and NewtonScript is based on prototypal inheritance as OOP model, even classes in JavaScript are mostly syntax sugar for how that is done at low level.

kaba0|2 years ago

Deliberately being different from other languages… that actually makes a lot of sense why go is the way it is.

And I don’t mean it in a good sense.

DrScientist|2 years ago

I'd agree - and I'm not sure it's even possible to have a language with every feature.

Languages are about telling computers[1] what to do - at the right level of abstraction for the task in hand.

As far as I can see ( as an outsider ) is the trick in language design, is not the programmer ergonomics per se - but creating a set of abstractions ( expressed as language features ) that can then be converted into machine code in a way that's some best combination of reliable, safe and fast.

[1] Not directly, but indirectly via compilers or interpreters.

pjmlp|2 years ago

Thankfully not everyone happens to agree with him.

Had it not been for the success of Docker and Kubernetes adoption, and Go would have been as successful in the market as Plan 9, Inferno and Limbo.

pharmakom|2 years ago

this view does not allow for situations where one language design is strictly better than another, which has happened a bunch of times in practice.