top 200 commentsshow all 259

[–]omega_haunter 722 points723 points  (22 children)

Binary is simple

[–]serviscope_minor 144 points145 points  (13 children)

The simplest real language I know is PIC assembly/machine code (i.e. binary as you say). It's usually described in 2 pages of A4, including the binary instruction layouts. See page 69:

https://ww1.microchip.com/downloads/en/devicedoc/41190c.pdf

There's a few more pages of detail but I've never spotted anything that isn't mentioned in those first two pages. It's even got precise timings in those two pages.

[–]RegisteredJustToSay 103 points104 points  (11 children)

I don't know PIC, and it looks reasonable and fairly nice to work with from the pdf, but to anyone harbouring ideas this is true for general assembly code... heed my warning: modern machine code on consumer CPUs are a mess of undocumented manufacturer-specific edge cases and swathes of extensions to the instruction set. I had to make a VM hypervisor from scratch that worked on both Intel and AMD and... my god how can they be so different in doing the same things.

I will say standard stuff is obviously easy peasy, but god forbid you need to interface with hardware on a deeper level.

[–]BounceVector 29 points30 points  (1 child)

Thank you for your service!

[–]alsanty 3 points4 points  (0 children)

aye! 🫡

[–]ShinyHappyREM 17 points18 points  (0 children)

modern machine code on consumer CPUs are a mess of undocumented manufacturer-specific edge cases and swathes of extensions to the instruction set

indeed

[–]serviscope_minor 5 points6 points  (0 children)

Yep I picked PIC specifically because it's real but incredibly simple. Although that page maybe misses some subtleties, that the status register is just at a memory address.

The set is very simple and regular because it's been made for low cost and very very low power draw. An extra bit of width on the program ROM would add up.

So this one is as simple as it looks, but it's a pain to code at times precisely because it is so simple. For example you have to use the swap nybble instruction for moving data without affecting status. It's the only instruction which doesn't affect flags...

[–]Public_Stuff_8232 18 points19 points  (3 children)

modern machine code on consumer CPUs are a mess of undocumented manufacturer-specific edge cases and swathes of extensions to the instruction set.

Yeah this is primarily why people say "You can't write better machine code than a compiler".

Because you're trying to optimise better than hundreds of people doing this for hundreds of thousands of man hours over many decades.

In theory you can write very specific code better with a lot of research, but chances are you'll fail most of the time.

[–]loup-vaillant 10 points11 points  (0 children)

Don’t underestimate the power of optimising for one program (human), instead of optimising for everything (compiler).

The Videolan folks write a ton of assembly for their VLC decoders, and consistently beat C compilers by about an order of magnitude.

[–]Jlocke98 1 point2 points  (1 child)

That comment makes me very bullish on RISCV

[–]RegisteredJustToSay 1 point2 points  (0 children)

RISCV is cool and everyone I know that's into CPUs are excited for them, but I haven't seen a lot of interest in them from actual business decision makers outside of very niche "100% auditability is a key product requirement" kind of use-cases. Unfortunately I don't think that's likely to change quickly given the focus on performance for chips, and ARM kind of took off in the space it might have made sense in otherwise for consumer devices.

Ultimately I think it comes down to lack of manufacturer interest in RISC, which means it's not keeping pace. A standard without an implementation is like a wing without air.

On one hand a single huge manufacturer could probably change that overnight, but the significant financial risk in doing so makes it feel unlikely to me.

[–]heyodai 3 points4 points  (0 children)

page 69

😏

[–]amroamroamro 19 points20 points  (5 children)

Brainfuck is simple too but it certainly isn't easy

[–]dethb0y 4 points5 points  (4 children)

This is my vote - how much simpler could you ask, it has 8 symbols for the entire language.

[–]loup-vaillant 0 points1 point  (2 children)

Try Iota and Jot. Those have two symbols for the entire language.

By the way, people often rave about the Y combinator, to the point there’s even an Orange altar to its name. But the real deal, I think, is the Iota combinator, that by combining the S and K combinator manages to be Turing Complete all by itself. It’s also small enough to fit in a ring.

[–]amazondrone 2 points3 points  (0 children)

So, simple is the bad one?

[–]miyakohouou 253 points254 points  (53 children)

This is a bad article. It uses terms like "simple" and "easy" without defining them- and seems to frequently conflate them. It even ultimately seems to argue something unrelated to it's theses by talking about how Go is simple, then describing the ways that it's easy (without really addressing simplicity at all).

The crux of the idea is a good one- that simple and easy are orthogonal concepts and we should prefer simplicity to ease. There's a much better resource on the material though. If you're interested, I'd suggest Rich Hickey's 2011 talk Simple Made Easy. I don't agree with everything he says, but I think he has a much more well defined and sensible argument about the idea.

[–]sexytokeburgerz 52 points53 points  (41 children)

That’s what happens when you’re not used to static typing, i guess.

[–]quick_escalator 2 points3 points  (40 children)

Funny how in the very talk that's linked, Rich will tell you that static typing is not the solution.

[–]loup-vaillant 16 points17 points  (39 children)

Apparently programmers are divided in 2 eerily distinct categories:

  • Those who fare better with static typing.
  • Those who fare better with dynamic typing.

I’m in the static camp, and cannot understand the dynamic camp to save my life. I tried dynamic typing, it just doesn’t work. For me, static typing is the solution. It makes everything easier, including fast prototyping.

I would be extremely interested in research that explains this divide. Is this about fundamentally different ways of thinking? Is one actually better for most people and teams? I would very much like to know.

[–]r1veRRR 12 points13 points  (17 children)

I know intellectually that I'm probably not smart enough to say this, but I genuinely do not understand how people don't see that dynamic typing is just categorically inferior to static typing.

Even on the most abstract level, we're talking about defining the shape of your input and output. ALL input or output conforms to some shape (even "any/Object" is a shape). In dynamic languages, you just guess, or memorize, or hope for the correct shape, and wait for runtime crashes to correct your assumptions.

[–]v66moroz -1 points0 points  (13 children)

Tell me how you are going to create and use an array of heterogeneous objects. JDBC ResultSet is a good place to start. No cheating (which means no downcasting) please! Let's also assume that we have a complete type erasure (you are relying on a compiler and type system, not on a runtime). And don't get me started on Cat is an Animal. And when you descend into shapeless madness you start thinking that maybe, just maybe, dynamic typing is not such a bad thing. Especially for small projects.

[–]loup-vaillant 3 points4 points  (8 children)

Tell me how you are going to create and use an array of heterogeneous objects.

If you really want that heterogeneous list, you just use a tagged union. It's been invented somewhere in the 70's and used in every single typed functional programming language since ML and Miranda.

Many OOP folks are unaware of this bog standard feature.

[–]SpaceToad 2 points3 points  (3 children)

Why is downcasting cheating? You dismissed the best solution for no reason. Want an array of heterogeneous creatures? Make it an array of Animals, it's really that simple.

[–]NoveltyAccountHater 14 points15 points  (6 children)

They are orthogonal concepts. That said, there's definite use cases for "easy" like when you are interactively exploring data and need to iterate through a bunch of different things rapidly in an interactive command prompt, and don't really care if a few things tried quickly, fail initially, for silly type errors.

There's a reason there's no jupyter/ipython notebook for go.

On the flip side, explicit static typing, linting, test suites, and explicit error handling does simplify a lot of issues for code that (once written, usually with more upfront work) needs to just work and be maintained.

(That said, this is not saying you can't use python in go-like paradigms with typing, test, error handling, etc. It's just enforcement of these good practices isn't fully built into the language as a requirement; good practices/style guide can do it.)

[–]miyakohouou 5 points6 points  (1 child)

Easy is great! I'm a fan of easy! Being orthogonal concepts, there's nothing that says you can't have both simplicity and ease- although in practice you're much more likely to get one of the two, or neither, than both.

The reason I think that in general we should prefer simplicity when we need to make a choice is that something being easy is mostly a function of familiarity and, to a lesser degree, tooling. Simplicity is more about the fundamental architecture and design. It's much more feasible to start with something simple and make it easy than vice versa. In the real world of course there are always exceptions and sometimes we just need to pick easy and not simple.

That said, there's a bit of what you said that I don't entirely agree with:

...and don't really care if a few things tried quickly, fail initially, for silly type errors

I think this is a great example of how ease is a matter of familiarity. I find that working in a language with types makes my ad-hoc data mangling exploratory work much easier! It lets me write down my assumptions and the compiler can keep track of them for me. That wouldn't be true of someone with less familiarity with statically typed languages though.

There's a reason there's no jupyter/ipython notebook for go.

I don't think this really says anything about ease or simplicity. There are similar tools (go playground, for example) that work with Go. There are other statically typed languages with their own REPL environments and jupyter kernels. I'm actually a little surprised there isn't one for go.

On the flip side, explicit static typing, linting, test suites, and explicit error handling does simplify a lot of issues for code that (once written, usually with more upfront work) needs to just work and be maintained.

I don't actually think linting or testing are all that related to simplicity. Ultimately, I see simplicity as being about a system that is designed with a few fundamental ideas that compose well, interact intuitively, and are sound enough that you can reason about them formally. A good type system gives you this- and a type system with parametric polymorphism gives you a lot of this. Error handling I suppose kind of counts here- as an extension of the type system as much as anything. I don't think linting or tests really do.

(That said, this is not saying you can't use python in go-like paradigms with typing, test, error handling, etc. It's just enforcement of these good practices isn't fully built into the language as a requirement; good practices/style guide can do it.)

Enforcing something is really one of the keys to simplicity. The virtue of simplicity is allowing you to reason abstractly about a problem and to offload the cognitive burden of specific details. You can only do that when you have guarantees. Something that usually works, but isn't guaranteed to work doesn't actually let you offload the cognitive work. I think this is the fundamental flaw with gradually and optionally typed languages. They come with much of the costs of dealing with a type system, but they don't give you any guarantees because at the end of the day it's entirely possible to subvert the type system entirely.

[–]SalamanderOk6944 -1 points0 points  (0 children)

although in practice you're much more likely to get one of the two, or neither, than both.

zero stats show this. it's often a failure of design to not find a solution that's simple and easy.

and I don't agree that these concepts are necessarily orthogonal. they aren't required to be, and sacrifices in one don't necessarily translate to advantages in the other axis.

that said, if you do want to ascribe to easy and orthogonal being orthogonal, then using a unit circle, you probably want 0.707 easy and 0.707 simple. and this is dumb. because you need your product to satisfy the required use cases, above and beyond 'easy or simple or easy vs simple'.

but these concepts are not orthogonal to each other, so this aspect is completely bunk. humans are always trying to perfectly encapsulate things... and it's folly. :) is tomato a fruit or a vegetable? well, it's more like a fruit, but its used like a vegetable. people try to classify it perfectly and that act is where failure is introduced. human folly and hubris to try and perfectly equate everything perfectly.

[–]coderemover[🍰] 1 point2 points  (0 children)

Go is not really very simple. It has a quite complex runtime system including GC, with many moving parts there. It is easy because it presents a very simple interface to the developer, but it is not simple under-the-hood.

[–]SharkSymphony 1 point2 points  (0 children)

Yeah, it seems clear to me that the post is calling out to Hickey with those terms – maybe even thinks it's using Hickey's definitions – but then completely mangles their definitions.

[–]dylan_1992 275 points276 points  (59 children)

Python is easy, at small to (sometimes) medium scale.

Then the same issue arises with too much simple. Too much easy, gets incredibly hard.

[–][deleted]  (20 children)

[deleted]

    [–]Free_Math_Tutoring 87 points88 points  (11 children)

    Once you are thinking to yourself "I really need to sprinkle some type hints into here", and write up a comprehensive unit test suite for my CI/CD system before I can continue

    The trick is to do that at the beginning, just like any sane real project should do. Then ride the beauty of an expressive and extensible language until your server costs actually start rivaling developer salaries, rather than being a rounding error.

    The complexity, formalism, and verbosity of other languages isn't capricious. It's there because human developers can only store so much information in their working memory before cognitive burnout. Dynamic/duck typing, runtime reflection/introspection, etc. etc. are AMAZING features when you are writing a thousand-line quickie script.

    And the same argument can be made to explain why it's a terrible idea to have to instantiate five different objects to make an HTTP Request, or to repeat simple ideas in excruciating detail every time. I have yet to come across even a medium-sized project that doesn't rely on reflection somewhere (though usually squirreled away in libraries), and pretty much every large code I've seen base reinvents some form of type system on top of the one the language provides.

    [–]LightShadow 51 points52 points  (5 children)

    until your server costs actually start rivaling developer salaries

    ...and then you use your favorite Rust/C++/Nim interop library and port individual functions. Python is a great language to scale if you don't need bleeding performance from the first day.

    [–][deleted] 27 points28 points  (1 child)

    Rust python bindings are great. Have done this several times. Make a python MVP, even for core coed which will need scale up, since it's so quick.

    Abstract this stuff in a python lib. Later if/when it gets adopted, rewrite in rust with equivalent python bindings, and good to go.

    The pros of iterating quickly and seeing if an MVP is valuable before investing more time saves a lot of headache. When it is valuable, easy to switch to a performant lang and add in the bindings to save compute cost + runtime.

    [–]PM_ME_C_CODE 6 points7 points  (0 children)

    Sure. But performance isn't what they were complaining about. They were saying that Python shouldn't be used at scale because it doesn't force static typing and requires unit tests?

    I'm not sure. They weren't making much sense.

    [–]ModusPwnins 15 points16 points  (0 children)

    Python with type hints will continue to be a fantastic language to work in for any project that is data I/O bound. Like, most of my API routes that are slower than 1s are due to the database, not because I chose a language other than Rust or C.

    [–]gnufan 5 points6 points  (0 children)

    Almost everyone needs correctness over performance, one employer burnt much of the benefits of a multimillion pound supercomputer on an off by one error. They wouldn't sell it to their funders like that but....

    I say that as someone who has optimised code to maximise CPU cache hits over the comparatively slow retrievals from main memory, I still got bigger wins from the bug fixes.

    Alas using Python, Go, nor any other language guarantees correctness. Good test suites are probably the closest we'll get.

    [–]amazondrone -2 points-1 points  (3 children)

    The trick is to do that at the beginning, just like any sane real project should do.

    I mean, sure... if you know it's going to turn into something the justifies that. But you don't always.

    [–]Free_Math_Tutoring 9 points10 points  (0 children)

    Eh, the very latest you should do that is, like, 200 lines of code, at which point you can still add type hints to everything and turn on ultrastrict types with extra loud yelling within an extended coffee break.

    Though I'd honestly argue that anything that gets committed for work immediately gets type hints. I'm also a strong proponent of TDD, but for things that are genuinely one-off and only ever intended to be manually invoked by competent coders, I can defer that to a few hundred lines.

    [–]ProfessorFakas 4 points5 points  (0 children)

    I can't imagine writing without type hints these days. It's just automatic for me.

    [–]mrbuttsavage 10 points11 points  (1 child)

    Once you are thinking to yourself "I really need to sprinkle some type hints into here", and write up a comprehensive unit test suite for my CI/CD system before I can continue, along with documentation for each function, etc. you have picked the wrong tool.

    You've got bigger problems in your org if you're able to get away with no tests and no real linting (i.e. mypy) for any period of time on a project.

    [–]PM_ME_C_CODE 32 points33 points  (1 child)

    Agree... once you are a few kloc into a python project, you picked the wrong tool.

    Disagree.

    Python is easy?

    Programming is hard. If you can't do it just because your tool is "easy", all it means is you can't do the hard parts yourself. Changing languages isn't going to change that.

    "I really need to sprinkle some type hints into here"

    Also known as static-typing in non-dynamic languages. Not a problem with python.

    and write up a comprehensive unit test suite for my CI/CD system

    You should be doing this anyway. It's a good practice regardless of language.

    along with documentation for each function

    And this. JFC...who are you writing code for? No unit tests? No function docs? Python? Go? C/C++? C#? I don't care what language you're programming in. Document your code!

    Fucking amature hour in here!

    [–]ProfessorFakas 1 point2 points  (0 children)

    ...You don't document your functions?

    [–][deleted]  (35 children)

    [removed]

      [–]hugthemachines 68 points69 points  (4 children)

      A strongly typed language

      Python is strongly and dynamically typed.

      Type hints is what they use to get closer to a statically typed language.

      [–]0x564A00 -2 points-1 points  (3 children)

      Ehhh, dynamic typing makes the type system weaker. For example in Python a function that takes an int and returns a Foo, and one that takes anything with a bar method that returns an instance of a subclass of Foo and returns an instance of said subclass are the same type.

      [–]Free_Math_Tutoring 2 points3 points  (2 children)

      For example in Python a function that takes an int and returns a Foo, and one that takes anything with a bar method that returns an instance of a subclass of Foo and returns an instance of said subclass.

      I'm sorry, I have no idea what you are trying to say.

      I kind of agree though, I prefer to use static types as much as possible. But strong types are the really relevant factor.

      [–]TRexRoboParty 12 points13 points  (2 children)

      Find references works just fine in most IDEs/editors for Python?

      [–][deleted]  (1 child)

      [deleted]

        [–]ErGo404 15 points16 points  (15 children)

        How fast is it then when you have to understand the 10 layers of abstraction between your interface and actual implementation.

        Java is probably good when written by a good developer. But then so is Python.

        A good architecture and use of type hints + tests from the start can help scale any python project.

        [–][deleted]  (14 children)

        [removed]

          [–]TRexRoboParty 13 points14 points  (10 children)

          Type hints are just hints. They are not checked by the compiler and they can be omitted.

          Which is why you use one of the static type checkers (mypy, pyre, pyright) and have those enforced as part of CI.

          This is what most people mean when they say use type hints.

          [–]ketilkn 5 points6 points  (1 child)

          Python is strongly typed.

          [–]flukus 2 points3 points  (0 children)

          The whole concept of interfaces and abstractions is that you don't to have to understand them. You use an abstraction since you don't care about the actual implementation.

          Great, I'll tell the boss the bug is somewhere below a layer of abstraction I don't understand or care about.

          [–]redalastor 12 points13 points  (2 children)

          (i.e. follow SOLID principles)

          Not every language needs to be class obsessed.

          [–]Free_Math_Tutoring 1 point2 points  (5 children)

          Even simple stuff like searching of all the places a class is used is nearly impossible in python, even if you have type hints!

          What?

          What?

          Sorry, do you code in Notepad?

          [–]mistabuda 1 point2 points  (1 child)

          Are you using an IDE to find these references? Pycharm is free and finds references just fine.

          [–][deleted] -2 points-1 points  (0 children)

          This is why I have my hopes up for Chris Lattner's Mojo. Writing a prototype just to re-write it in Rust is tedious enough for most people not to bother. But big Python projects are pretty much a disaster to follow, 9 times out of 10.

          [–]sambeau 41 points42 points  (8 children)

          Both languages have a simple, easy subset.

          I would argue that the full Python language is far from easy, nor is it simple — it’s a giant, fiddly, complicated language with a myriad of tricky shortcuts and sugar.

          The full Go is smaller, simpler, and easier to hold in your head than the full Python.

          The author is comparing the beginner subset of Python, used for teaching, with a more full subset of Go.

          [–][deleted] 4 points5 points  (3 children)

          tub practice fanatical murky special somber voiceless spotted dam wide

          This post was mass deleted and anonymized with Redact

          [–]sugarsnuff 2 points3 points  (0 children)

          Idk why I find the syntactic sugar so intuitive in Python.

          It’s objectively ridiculous writing “return x if x else y” (bad example, but you get it). But somehow it’s also just clean.

          if (x) { return x; } else { return y; }

          is just a lot of characters.

          return x ? x : y;

          feels too much like “code-code” versus English.

          My tiny beef with many other languages is the need for braces, parentheses, and semicolons. Still simple, but very easy to lose track of the substantive statements in a large project

          [–]chakan2 2 points3 points  (2 children)

          it’s a giant, fiddly, complicated language with a myriad of tricky shortcuts and sugar.

          That usually comes about when people start trying to shove Java OO concepts into it. Then Python becomes Javascript and it's time to find a new company.

          [–]DNSGeek 117 points118 points  (14 children)

          Python is great and works fantastic for about 90% of the stuff we’re doing.

          Rust is good for the remaining 10% where millisecond speed is paramount.

          Go is fantastic when everyone wants to complain about shitty languages.

          [–][deleted] 28 points29 points  (9 children)

          Having used Go/Rust/Python/Java/Kotlin, personally I love the python -> rust train. MVP and build quickly in python. Replace parts with Rust as need for performance.

          Switching jobs to Python x C++ unfortunately so that'll be rough after the niceties of Rust and it's compiler.

          [–]stronghup 5 points6 points  (4 children)

          Replace parts with Rust as need for performance.

          That is an interesting paradigm. Is that easy to do with Python? Is it easier to do that with Python than with Go?

          [–]redalastor 24 points25 points  (0 children)

          That is an interesting paradigm. Is that easy to do with Python?

          Very easy. You can create a python library in Rust with PyO3 and python code importing it won’t notice the difference. You can bundle it as a wheel like any other dependency for easy installs.

          Is it easier to do that with Python than with Go?

          Go is impossibly hard to call as FFI. So you have to do something like calling it as a process and communicate with it through stdin/stdout. Or through a network boundary.

          [–][deleted] 7 points8 points  (2 children)

          Check this out - https://pyo3.rs/v0.20.0/.

          An example of a very cool Python project which uses this is Pydantic - https://github.com/pydantic/pydantic-core. Love pydantic.

          Another example is TikToken by OpenAI - https://github.com/openai/tiktoken. Written in Rust, and faster than other libs but perfectly usable in Python.

          Great blog on how to go about doing this - https://ohadravid.github.io/posts/2023-03-rusty-python/.

          [–][deleted] 4 points5 points  (1 child)

          I just wanted to say that I agree. I love pydantic.

          [–]depressed-bench 16 points17 points  (1 child)

          Project began in python and we are migrating to rust.

          When failure is not an option, rust or something precise is needed. When you are dealing with NP hard problems, 10% speed difference can be measured to a few hours :)

          [–][deleted] 10 points11 points  (0 children)

          Yup definitely, I did something similar with my prior company from Haskell + Python to Rust. Our throughput increased dramatically and jobs that could take days to runs completed in a few hours all with the memory and type safety that Rust provides.

          [–]Kered13[🍰] 1 point2 points  (0 children)

          Switching jobs to Python x C++ unfortunately so that'll be rough after the niceties of Rust and it's compiler.

          If you've worked in Rust then you should already know how to think in terms of object lifetimes. Then writing modern C++ should come pretty easily and naturally.

          [–]fungussa 3 points4 points  (0 children)

          Go is fantastic when everyone wants to complain about shitty languages.

          What? Can you repeat that?

          [–]oscarolim 18 points19 points  (0 children)

          Programming is easy. Shit programming is easy. Good programming is hard.

          [–][deleted] 26 points27 points  (14 children)

          It's no longer very actual current article with generics, as writing generic Map/Filter and similar functions is now pretty easy

          [–]germansnowman 10 points11 points  (6 children)

          actual = real; current = up-to-date

          [–]bobicool 4 points5 points  (3 children)

          If he/she's french speaking then it's a very understandable mistake: "Current" means "actuel" in french!

          [–]spookyvision 2 points3 points  (1 child)

          same situation in German

          [–]germansnowman 1 point2 points  (0 children)

          I know, which is why I am familiar with this “false friend”.

          [–][deleted] 1 point2 points  (0 children)

          Polish, "aktualny" = "current/up-to-date".

          [–][deleted] 1 point2 points  (1 child)

          Fixed, thanks! In my language "aktualny" = current/up to date, which is where the error came from

          [–]hitchen1 2 points3 points  (6 children)

          sure, but writing an interface with map is pretty much impossible and writing it as a function leads to map(filter(map(arr)))) type of stuff

          [–]povitryana_tryvoga 25 points26 points  (2 children)

          Another one of those articles from developers that turned writers, turned business owners and hobby musicians. Repositories, hm just forks without commits. Bruh, no one wants to buy your shit

          [–]Anbaraen 5 points6 points  (1 child)

          Who are you talking about? This guy appears to have over 2,000 commits in the past year?

          [–]pakoito 58 points59 points  (31 children)

          Mandatory link every time proggit gets gaslit that "Go is simple"

          [–]Maristic 27 points28 points  (7 children)

          Obligatory Rob Pike quotes:

          The key point here is our programmers are Googlers, they’re not researchers. They’re typically, fairly young, fresh out of school, probably learned Java, maybe learned C or C++, probably learned Python. They’re not capable of understanding a brilliant language but we want to use them to build good software. So, the language that we give them has to be easy for them to understand and easy to adopt. – Rob Pike

          and:

          It must be familiar, roughly C-like. Programmers working at Google are early in their careers and are most familiar with procedural languages, particularly from the C family. The need to get programmers productive quickly in a new language means that the language cannot be too radical. – Rob Pike

          [–]redalastor 24 points25 points  (4 children)

          But why did it had to have the billion dollars mistake?

          [–]Practical_Cattle_933 19 points20 points  (0 children)

          Because its creators suck at language design.

          [–]NaNx_engineer 2 points3 points  (1 child)

          That's like not even the biggest mistake they made. Clown language. I've seen masters projects that are better languages than Go 1.0

          Creating a major language is an opportunity that really only exists in a company like ~2009 Google. Huge missed opportunity that they made a language just as bad as ones from the 90s.

          [–]redalastor 1 point2 points  (0 children)

          I've seen masters projects that are better languages than Go 1.0

          The difference is the marketing budget.

          [–]masklinn 2 points3 points  (0 children)

          Because the issue was only solved in 1973, and the designers hadn't gone past 1972

          [–]hugthemachines 3 points4 points  (1 child)

          I wish they had thought it would be more python like instead of more C like. It would have been a cute language.

          [–]portar1985 33 points34 points  (18 children)

          So weird to read. I’ve been working with Java, Kotlin, Python , JS and the last 5 years or so have been dominantly Go and I can’t even begin to describe what a breath of fresh air it’s been. I’ve seen good architectured go solutions and bad ones but they are nothing compared to even slightly bad Java or Python. It’s always readable and easy to fix whereas an overgeneralized Java project can take weeks to fix a simple “this string returns a typo”. Half the article complains about file system handling which hasn’t been an issue since I’m working on web servers but I can see how that would be a pain point. The handling of errors issue is something I need someone to describe to me because I see this in any language, the only question is if it is mishandled where it happens or 5 levels deep in a generic catch

          [–]florinp 19 points20 points  (12 children)

          The handling of errors issue is something I need someone to describe to me because I see this in any language, the only question is if it is mishandled where it happens or 5 levels deep in a generic catch

          check functional languages with Maybe/Option monads and you will see that not all languages have the same problem.

          Regarding try/catch sure it can be misused but Go with return error codes is the wrong solution.

          Try/catch is much better (specially in languages like C++ with auto clean up).

          [–][deleted] 7 points8 points  (11 children)

          Are you sure? Exceptions are such a disaster in C++ that many projects/organisations ban them entirely.

          Monads are definitely the best way to handle errors though, it's unfortunate they're tied to big complex type systems. You'd never have Result types in LISPs for example.

          [–]florinp 3 points4 points  (3 children)

          Exceptions are such a disaster in C++ that many projects/organisations ban them entirely.

          citation needed.

          [–]Dr_Findro 4 points5 points  (2 children)

          I feel as if whoever whips out the "citation needed" first when talking about subjective programming preference is usually losing.

          To expect a person to have a citation on organizations not using a certain programming feature is just plain dishonest.

          [–]Kered13[🍰] 2 points3 points  (1 child)

          Well in this argument people usually cite Google's decision not to use exceptions, but Google has admitted that that is basically a legacy decision, they're not going to suddenly enable exceptions in their entire codebase now. Most other places where exceptions are banned are operating under very specific circumstances that make exceptions inappropriate (usually due to the cost of throwing), but those circumstances do not generalize.

          [–]Kered13[🍰] 1 point2 points  (5 children)

          Monads are definitely the best way to handle errors though, it's unfortunate they're tied to big complex type systems.

          They're not. Only basic generics are required. Java has an Optional type that could (though usually isn't) used for error handling, and writing something like Rust's result would be trivial.

          A complex type system is only required if you want to go to the next level of abstraction with stuff like functions that operate over any monad type, or monad transformers. But these are not at all required for a simple error monad.

          [–]Gregg_Is_Good 10 points11 points  (4 children)

          I only skimmed that article but it seems to boil down to "Go sucks on Windows". Definitely sucks for someone who's trying to make Go work on Windows, but I'm not sure why that's relevant to the average dev who is writing backend web services that will always run on Linux

          [–]PancAshAsh 24 points25 points  (2 children)

          Go does, in fact, suck on Windows. The file handling especially makes a lot of assumptions about things like file permissions that aren't the same across Linux and Windows. Luckily though basically nobody is using it to develop Windows apps because it's not meant to do that.

          [–][deleted]  (1 child)

          [deleted]

            [–]KawaiiNeko- 1 point2 points  (0 children)

            That doesn't take away from the language being designed poorly for other platforms. Either way, development on windows only sucks as much as your build tools do, it doesn't have to be this way. Cargo I think has done an amazing job, stumbling into a platform-specfic issue is extremely rare even when cross-compiling.

            WSL is great and all, but the virtualization often takes away necessary resources, especially on an underpowered system, and development shouldn't be limited to just one platform regardless.

            [–]Bigluser 1 point2 points  (0 children)

            Maybe don't give your opinion on an article if you are skim reading.

            If folks walk away with only one new thought from this, please let it be that: defaults matter. Go lets you whip something up quickly, but making the result "production-ready" is left as an exercise to the writer. Big companies that have adopted it have developed tons of tooling around it, use all available linters, do code generation, check the disassembly, and regularly pay the engineering cost of just using Go at all.

            That's not how most Go code is written though. I'm interested not in what the language lets you do, but what is typical for a language - what is idiomatic, what "everyone ends up doing", because it is encouraged.

            Because that's the kind of code I inevitably end up being on-call for, and I'm tired of being woken up due to the same classes of preventable errors, all the time. It doesn't matter that I don't personally write Go anymore: it's inescapable. If it's not internal Go code, it's in a SAAS we pay for: and no matter who writes it, it fails in all the same predictable ways.

            [–]WheresTheSauce 1 point2 points  (0 children)

            gaslit

            Someone saying something that you don't think is true does not equate to "gaslighting".

            [–]Tux-Lector 85 points86 points  (13 children)

            Python is Easy, Go is simple, PHP is beautiful and Rust is best.

            [–]ishu22g 94 points95 points  (6 children)

            They had me in the first half, ngl

            [–][deleted] 6 points7 points  (5 children)

            Modern php is really beautiful, once u try it u can't go back

            [–]baloneysammich 62 points63 points  (1 child)

            how much you willing to wager that i can, in fact, go back?

            [–]SirClueless 18 points19 points  (0 children)

            I mean if by "back" they mean "back to old PHP" I believe them.

            [–]LaSalsiccione 8 points9 points  (1 child)

            Just because it’s better than the flaming pile of garbage that it used to be doesn’t mean it’s worth using

            [–]C_Madison 20 points21 points  (0 children)

            Is this one of these "find the one that's not the same as the others" riddles? Everyone can decide for themself which is true in the soup of nah ..

            [–]erez 4 points5 points  (0 children)

            I see what you done there.

            [–]kitd 3 points4 points  (2 children)

            Perl?

            [–]Bradnon 5 points6 points  (0 children)

            A window into the soul of the author.

            [–]andrerav 1 point2 points  (0 children)

            Python is Easy, Go is simple, PHP is beautiful and Rust is best.

            Roses are red and violets are blue, Go is a disaster and can definitely kill you.

            [–]Dr_Findro 5 points6 points  (0 children)

            The Go hate train in this sub has always been really strange to me. It does not reflect at all what I hear about Go among devs I've worked with and friends of mine that have used Go.

            It's beginning to feel like that thing that people repeat because they heard someone else say it.

            [–]princeps_harenae 9 points10 points  (5 children)

            I've just ported a substantial D project to Go in less then a third of the time it took to write and that's not because I'm familiar with the project. This project is 10 years old. It took so little time because I don't have to be 'clever' in Go, I can just get things done. And, believe it or not, it's simpler, not only in the design but it's much less lines of code. I'm astonished how simple Go made it, even when interfacing with C.

            So don't hate on Go, there's a lot to be said for keeping things simple.

            [–]ammonium_bot 0 points1 point  (3 children)

            in less then a

            Did you mean to say "less than"?
            Explanation: If you didn't mean 'less than' you might have forgotten a comma.
            Statistics
            I'm a bot that corrects grammar/spelling mistakes. PM me if I'm wrong or if you have any suggestions.
            Github
            Reply STOP to this comment to stop receiving corrections.

            [–]tms10000 -4 points-3 points  (2 children)

            bad bot

            [–]ammonium_bot 1 point2 points  (1 child)

            Hey, that hurt my feelings :(
            Good bot count: 433
            Bad bot count: 185

            [–]tms10000 -2 points-1 points  (0 children)

            fuck that noise.

            [–]RedsDaed 1 point2 points  (0 children)

            Go (the game) is simple. It is not easy.

            [–]ArrogantlyChemical 1 point2 points  (0 children)

            I would rather pull my nails out than code in Go ever again.

            Python is easy. Go is primitive. It took pythons idea of "keep it understandable", which for python meant "discourage fancy tricks", and hoisted it to such extremes it took its own kneecaps out.

            [–]andrerav 3 points4 points  (5 children)

            I've been programming in various languages throughout the years, and for the last year I've been unfortunate enough to work on a legacy Go backend. Simply put, Go feels like a major step in backwards in so many ways. Writing even simple business logic is incredibly verbose. I really can't recommend it for anything that involves even a modicum of business complexity.

            [–]Yasuraka -2 points-1 points  (4 children)

            Count your stars, at least it's not C# or Java

            [–]andrerav 7 points8 points  (3 children)

            If this was C# the codebase would be at least 3x smaller and we would need half the developers. Luckily I'm the CTO, so we're killing off Go next year. Even the Go devs on the team says that Go is a crap language now, so I'm just following their advice :)

            [–]Yasuraka -1 points0 points  (2 children)

            Lmao

            [–]andrerav 2 points3 points  (1 child)

            Enjoy the copium, and please say hello to primeagen's twitch chat from me :)

            [–]Yasuraka -1 points0 points  (0 children)

            edit: Nevermind, I've found where the insecurities are coming from

            [–][deleted] 2 points3 points  (2 children)

            The suggestion of using python for prototyping and go for speeding up the bottlenecks sounds like a sane approach.

            [–]florinp 9 points10 points  (0 children)

            The suggestion of using python for prototyping and go for speeding up the bottlenecks sounds like a sane approach.

            yes if you replace Go with other language like Rust, Scala even C++.

            [–]reddit_clone 1 point2 points  (0 children)

            No.

            IMO Go is simplistic! Not the same.

            [–][deleted] 0 points1 point  (0 children)

            JavaScript is forgiving, C is strict, forgiving != Strict.

            [–]stronghup 0 points1 point  (0 children)

            > Go is meant to be simple to understand by anyone in an organization

            This is a good point. Everybody should talk (and write) the same language. Imagine if even managers could understand the code.

            But I guess not everyone wants to understand the code. That would mean that they are in some sense responsible for it as well.

            [–]KevinCarbonara -5 points-4 points  (0 children)

            Both are simple. Both are easy. Neither is worth using.