4 ms·
Programming has and almost infinite depth to it, depending on the complexity you are tackling/modeling. In a way, it is like mathematics in the way you have lay
by sangnoir 6y ago
Programming has and almost infinite depth to it, depending on the complexity you are tackling/modeling. In a way, it is like mathematics in the way you have layers acting as foundations/abstractions for more complex representation. Introduction to mathematics is counting discrete things, then the number line, addition, which is a foundation for/abstracted by multiplication, which is in turn a foundation for/abstracted by exponents, etc. and in no time, you're at the level of multi-variate calculus and n-dimensional hypercubes.
Each level requires notation that is concise (so it can fit in short-term memory to be actually useful) - one cannot expect graduate-level mathematics to share the same notation/symbols as beginner (elementary) maths.
Programming languages have to trade off which level they are biased towards, I do not believe in a universal language that is both easy for beginners while being concise for advanced users.
Back on topic - Go is not an easy language, it is a simple language, those 2 things are not the same.
- Zababa 6y ago> Back on topic - Go is not an easy language, it is a simple language, those 2 things are not the same. I often see this point here, but I always wonder what people mean by it. Could you elaborate on that point?
- sangnoir 6y agoTo me, what makes Go simple language is limited set of building blocks, and being very opinionated - this mostly relates to syntax and what the core language provides out of the box. With Go, you only need to understand looping, branching, channels, slices and you're mostly good to go. Ease is measured by how a language may be used to solve a problem. As an example, text-wrangling with Perl is easy - but you may have to do it using complex (i.e. not simple) representation. Back to Go - channels are a simple concept, but are not (always) easy to work with if you do not put a lot of thought into your concurrency model. Edit: I just thought of another way to express the difference between "simple" and "easy". The notation of adding "1+1=2" is simple, however proving that "1+1=2" is not easy (at least at the level of elementary students).
- epicide 6y agoNot OP, but I'd be happy to try and differentiate, as well. Simple means uncomplicated, not a lot of pieces. A violin is arguably simpler than a guitar because of a lack of frets. Easy means it is not difficult. A guitar is arguably easier than violin [0] because it has frets. It's important to remember that "easy" is very subjective. What is easy for one person might be insurmountable to another. tl;dr "simple" usually means "easy to understand" and "easy" usually means "easy to do". Both inherently assume some amount of prior knowledge or skill, so neither is entirely universal or objective. [0]: I'm not trying to say one instrument is better or disparage and guitarists. It's an example.
- tyingq 6y agoI think the author's example is pretty good. "How do you remove an item from an array in Ruby? list.delete_at(i)...Pretty easy, yeah?" "In Go it’s … less easy; to remove the index i you need to do:" list = append(list[:i], list[i+1:]...) So Go is simple in that it doesn't have shortcut functions for things. There's generally one way to do things, which is simple. But it's not easy, because it's certainly not intuitive that "append" is the way to remove an array element.
- steveklabnik 6y agoThe primary source for this is https://www.infoq.com/presentations/Simple-Made-Easy/ https://www.infoq.com/presentations/Simple-Made-Easy/ (I am not entirely sure I agree with its thesis or its applicability to Go, but since nobody had actually linked you directly to the concept, I thought it would be worthwhile to do so.)
- epicide 6y ago> Go is not an easy language, it is a simple language, those 2 things are not the same. This distinction is fundamental to any sort of design, but is unfortunately lost on a lot of people (especially developers, in my experience). Easy and simple are near-universally conflated. > I do not believe in a universal language that is both easy for beginners while being concise for advanced users. Exactly. I really want some languages to be more intuitive and easy to pick up for non-programmers. The average person (whatever that means) does not have the first clue about the machines that run so many parts of their lives. At the same time, such a language would likely be a bad fit for most professional software development. That hardly means it's without value. I know languages like that exist, but they're often aimed at absolute beginners and are treated like toys. There doesn't seem to be much middle ground or "transition languages". Insert joke about how $LANGUAGE_YOU_DISLIKE is a toy.
- jacobr1 6y agoIt seems like Basic has been the closest we've come on a general purpose language with "easy to pick up features" (at least in widespread use)?
- malloci 6y ago> The average person (whatever that means) does not have the first clue about the machines that run so many parts of their lives. Sadly, I would argue that this is also true of many developers.
- jacobajit 6y agoI mean, Python is the de facto beginner language and also used for professional software development (and of course intermediate data science work). Are you suggesting this is an unwise or unstable equilibrium?
- epicide 6y agoI'm glad you bring that up. I think Python is the closest we have to a "universal language" (even so, it still has some limitations). I think it works well for beginners because the language itself is so consistent and they have put a lot of effort into avoiding corner cases and "gotchas". And I think it works for professional uses because of third party library support. To answer your question: I'm not suggesting that at all. I'm honestly not entirely sure how Python balances it seemingly so well. Given the lack of focus in the industry towards "intermediate" programmers and use cases, my slight fear is that Python will be shoehorned into one direction or the other. Even if the language itself isn't, it does feel like the use-case-complexity gap is growing exponentially, at times. And not just with Python. Seemingly, you're either a complete beginner learning conditionals and for-loops or you're scaling out a multi-region platform serving millions of users with many 9's of uptime.
- kstenerud 6y agoGo isn't even simple. They tried to be simple, but mostly managed to only move the complexity around, or foist it on to the user's shoulders by not providing a layered, composeable API in the standard library. There are some kinds of complexity you can't eliminate; only contain through careful, thoughtful architecture. Unfortunately, people often confuse this with the eliminatable kind, and end up making a bigger and bigger mess as they push things around.
- t0astbread 6y agoWhat do you mean by "layered, composeable API"? Go does provide abstractions for common use cases in its standard library (`io.ReadAll` for example) and there are interfaces to connect different parts of the standard library (`io.Reader`/`Writer`, `fs.FS` etc.).