分享

Krzysztof Kowalczyk notes by tag

 jerrysyfx 2018-02-11
Home / Notes / 2 notes tagged with #rant

There's a famous quote "Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.".

I've never seen anyone disagree with that and yet Go, the only language that takes this principle seriously, is visciously denigrated because it didn't add all those features that could possibly be added. Generics, fancy type system, optionals, non-nullable types, unions, exceptions.

I think it shows that most people don't really understand the quote. They think that the opposite is "don't add unnecessary features" and who would be in favor of unnecessary features?

But what the quote is really saying is: "you should resist adding features, even though they are useful; their cost is additional complexity and you should strive to keep complexity to minimum while still providing core value".

It's easy to agree with such a sentiment in abstract but when you start talking about concrete features, this wisdom suddenly disappears.

Features sell. The value of a feature is easy to visualise, the value of simplicity due to lack of the feature is not.

Go is a controversial language, often criticized for lack of sophistication. "We know how to do things better!".

I think of Go as Moneyball For Programming Languages: How to get maximum capability from minimal feature set.

Go makes much more sense when you look at it through "biggest bang for the buck" prism.

Go ruthlessly eliminates duplicate features and non-critical .

Enums? Can be replaced by idealized integers.

do/while loops? Can be replaced by slightly extended for.

Generics? You get the most common generic types built-in (slices and maps) but no user-defined generics.

Unit testing, benchmarking? You get that as part of standard library but it's ridiculusly minimal compared to, say, jUnit from Java world.

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多