Go, frameworks, and Ludditry

Source: Internet
Author: User
Tags configuration settings
This is a creation in Article, where the information may have evolved or changed.

A topic that have weighed on my mind recently are the dichotomy of frameworks vs. libraries in the Go community.

Is the prevailing stance against complex frameworks a rejection of this purported labour saving automation, or an Enlighte Ned position that have weighed the pro ' s and cons and found the costs of a framework based approached outweighs the benefit S?

A framework calls your code, you call a library.

If you want to call net/http a framework under that definition, go for it. You can win that argument, but don ' t let it fool your into thinking that's the exception that proves the rule.

Frameworks, if they communicate with your code in simple terms is tone deaf. Unable to express the intent that they has been asked to pass in to your, they force you to glean meaning from their Obscu Re requests via processes akin to psychic divination. Alternatively frameworks subject a increasingly bureaucratic interaction of call-backs, configuration settings, an D rigid parameters.

By comparison, the best libraries is the ones with loose coupling, powered by the pervasive nature of Go ' s interface. These simple abstractions allow you to compose your own grammar specialised to the task at hand.

Writing programs is fundamentally about interpreting data. If you outsource this interpreter to someone else, you had artificially constrained the vocabulary with which to describe and interact with that data.

Given These II choices, I am happy to stand with the camp who desire simple composable types and packages.

Related Posts:

    1. Ice cream makers and data races
    2. Accidental method Value
    3. Using//+build to switch between Debug and release builds
    4. Functional options for friendly APIs
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.