More Go bad design



  • Found interesting comments section on Hacker News:

    Consistent standard library?

    It's a crapshoot what will be an interface and what will be a struct, which is one of the fundamental features of the language.

    Returned error values are sometimes errors.New (e.g. io.EOF) and sometimes random fmt.Errorf strings that couldn't possibly be handled (e.g. all of tls.go basically), sometimes actual structs (e.g. PathError), and sometimes panics.

    If you can't even get error handling right and consistent, what claim do you have to consistency? At least in java it's pretty much all exceptions.

    The math library, as mentioned above, is pretty darn iffy.

    The existence of both 'path' and 'filepath' is possibly a mistake.

    The 'heap' and 'list' in collections both seem like they should be similar, but 'heap' operates on a thing that fulfills its interface and list operates directly on arbitrary objects without some interface needed.

    Due to the lack of 'protected', the std library is littered with exported fields you shouldn't use (e.g. gob.CommonType and template.Template.*parse.Tree and so on).

    Sure, the library is consistent in many places because the language is so small there's little else it can do but be consistent, but the fact that it falls flat in error handling and has visible warts makes me feel that it's a very broad std library, but far less consistent than, say, Rust's (where everything returns consistent Optional error types) or Java's or Smalltalks. Sure, it's more consistent than the clusterfuck that is ruby and/or python or javascript or (heaven forbid) c/c++, but by no means is being better than any of those an achievement in this category.

    Everything in Go's math library operates on Float64 types, so:

    My biggest disappointments early on was not even having a Max/Min function for ints.

    Also read this second thread, about Go using comments as meta-data:

    Part of the problem with comment syntax is that it's intentionally lexical and uniform. This simplicity means that you can easily obliterate the content of comments at any point in the input file stream via the tokenizer. However, Go instead has to bend over backwards in it's compiler toolchain to preserve comments beyond the lexer: in the parser, AST, code generator, etc.

    Compare to docstrings in SmallTalk/Python/Clojure, where they are actual parsed string literals. Also compare to C#, which has explicit and distinct syntax for comments, metadata, and compiler directives. Comments can be inserted more or less anywhere. Metadata only where it's unambiguously attached to an AST node. And directives similarly to statements, unambiguously detached from other AST nodes.


  • Winner of the 2016 Presidential Election

    This post is deleted!


  • @ben_lubar, @riking, your thoroughly ridiculous and easily dismissed rebuttal?



  • More and more I'm convinced go will win over rust and others.

    It has all the characteristics of a winner language.

    • A few admirable features and a lot of warts coders can geek over (5 years from now: "Secrets of a golang ninja", "Golang the Good Parts")
    • Small surface area, so anyone can easily get into it
    • Wide reach, with its static compiled binaries, that can be distributed anywhere

    Ben was right. Go is the future.

    I'm already spending my afternoons naked in front of a mirror, with my fedora, repeating "I'm a golanger. I'm a golanger". Feels right.



  • @cartman82, release your style and light up the web!

    Microsoft Silver Light Web – 01:37
    — mudassirphool


  • Winner of the 2016 Presidential Election

    It's interesting how none of that video was anybody using IE... they just used holograms and skateboards. Was skateboards supposed to be the future of computers? If that was the prediction they went wrong in more way than just IE-only.

    Filed Under: If IE was a skateboard, would you use it?



  • @Kuro said:

    they just used holograms and skateboards

    Microsoft is already working on hologram glasses. They just need to get started on skates.



  • @Kuro said:

    If that was the prediction they went wrong in more way than just IE-only.

    Silverlight wasn't. And it was even on Mac. It was pretty good, overall.


  • sockdevs

    Hardware acceleration didn't work on Mac though, IIRC


  • Winner of the 2016 Presidential Election

    Oh... I probably confused it with ActiveX and all that other stuff I never used. What did Silverlight actually offer?

    Filed Under: Might want to jeff this silverlight discussion away from here, @boomzilla


  • sockdevs

    @Kuro said:

    What did Silverlight actually offer?

    It was MS's answer to Flash


  • Winner of the 2016 Presidential Election

    maybe Flash was Macromedias answer to skateboarding?!

    Filed Under: The circle connects



  • WPF Everywhere :tm:.

    Basically, C# instead of ActionScript, "more secure" since .NET CAS, the same shape stuff as Flash minus shape tweening but plus data binding without Generator, and your WPF desktop app only needs tweaks rather than a full rewrite to go on the Web.

    Also support for PlayReady/PlaysForSure DRM. Which is all anyone actually used it for.


  • sockdevs

    And in Silverlight 5, a partial port of XNA so you could to 3D graphics



  • @Kuro said:

    What did Silverlight actually offer?

    All the improvements of ActionScript 3 before Adobe got off their fat asses and actually wrote ActionScript 3.

    ... oh, except Silverlight also integrated (and could be manipulated) with the DOM and I don't think Flash ever managed that awesome trick.



  • Plus a language that actually had a history of use both for desktop applications and for Web sites, server side and client side, rather than Flash-only (as it was then).

    Oh, and C# too. :trolleybus:



  • And you could do all the dumb xaml stuff, like set the foreground of a text element to a brush that's playing video.

    (I like that you can, but someone once told me about that as one of the advantages, which strikes me as funny)



  • Useful in game dev, which is something Flash is big in.



  • Flash is the ultimate proof that you don't need good tools to make a good product. It just needs to work and be easy enough for you to wrap your head around it.

    Seriously, Flash is TERRIBLE choice for games. The only reason it got popular is because it was far more functional than JavaScript and far easier than Java, the only two real alternatives there were.



  • @Gaska said:

    Seriously, Flash is TERRIBLE choice for games.

    That's simply not true.

    Especially for building games in a browser.



  • @blakeyrat said:

    That's simply not true.

    Yep, horrible performance due to display lists hierarchy is totally not a problem for games. Neither is lack of hardware acceleration (prior to 10.1) or 3D graphics (prior to 10.0). And every game developer loves stringly-typed enums!

    @blakeyrat said:

    Especially for building games in a browser.

    As I mentioned in my previous post, there are only two reasons people made games in Flash: it's quite easy to get started, and there was no real alternative (not true anymore since the advent of HTML5 and Unity).



  • It's sad how far we are from a true alternative to JS on the browser. Google with Go/Dart, Mozilla with Rust and ASM, and MS with whatever they are doing this month.



  • @blakeyrat said:

    That's simply not true.

    Especially for building games in a browser.

    I have yet to see a flash game that I neither hated nor wished it wasn't made in flash.

    There was just something off-putting about the flash technology, aside any technical limitations. The things made in it were just never pleasant to use.

    @Eldelshell said:

    It's sad how far we are from a true alternative to JS on the browser. Google with Go/Dart, Mozilla with Rust and ASM, and MS with whatever they are doing this month.

    To get a new language, browser vendors would not only have to throw away thousands of dev hours sunk into their js engines, but would also have to work together without screwing each other over patents, "synergy" features, public opinion, prestige...

    And in the end, all we'd get is once again something like javascript. Look around. It's not like there are viable new language ideas floating around.

    We should be happy EcmaScript is actually moving forward and making js better, unlike many other languages stuck in the rut. This is the best we'll get in the foreseeable future.



  • @blakeyrat said:

    @Gaska said:
    Seriously, Flash is TERRIBLE choice for games.

    That's simply not true.

    Especially for building games in a browser.

    Unity/HTML5. That should pretty much be the end of that discussion right there.

    EDIT: Somebody else said the same thing and I missed it because I was being a dummy and not reading the words in front of my face properly. So, business as usual for me I suppose ;)



  • What I came away with from the OP is that Go has:
    @blakeyrat said:

    visible warts

    and can be likened to an:
    @blakeyrat said:
    std

    Filed under: Subliminal messaging



  • @Masaaki_Hosoi said:

    Unity/HTML5. That should pretty much be the end of that discussion right there.

    Well, yeah, that's what I tried to do - yet you prolonged the discussion by repeating what I already said at the end of my previous post. Also, Flash was terrible long before Unity was made.



  • @Gaska said:

    @Masaaki_Hosoi said:
    Unity/HTML5. That should pretty much be the end of that discussion right there.

    Well, yeah, that's what I tried to do - yet you prolonged the discussion by repeating what I already said at the end of my previous post.

    Oops, missed that bit >.<



  • @Gaska said:

    As I mentioned in my previous post, there are only two reasons people made games in Flash: it's quite easy to get started, and there was no real alternative (not true anymore since the advent of HTML5 and Unity).

    Oh I see. So it's a bad choice but the better choice is an imaginary thing that doesn't exist.



  • @Eldelshell said:

    It's sad how far we are from a true alternative to JS on the browser.

    We had one. For ages.

    We got rid of it because it was a bad idea.

    I don't know why you think we should have a second one.



  • @cartman82 said:

    There was just something off-putting about the flash technology, aside any technical limitations. The things made in it were just never pleasant to use.

    Ok well I don't make decisions based on off-putting-ness. Whatever the fuck that even means.



  • @blakeyrat said:

    Oh I see. So it's a bad choice but the better choice is an imaginary thing that doesn't exist.

    Exactly. You can have shittiest product possible and people are still going to use it if you're the first one in the market.


  • Discourse touched me in a no-no place

    @Gaska said:

    stringly-typed enums!

    So you're a bondage-and-disciplineinb4:giggity: type instead?



  • We are Anonymous Types.


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.