Comment by xtracto

Comment by xtracto a day ago

22 replies

I recently started writing Go for a new job, after 20 years of not touching a compiled language for something serious (I've done DevKitArm dev. as a hobby).

I know it's mostly a matter of tastes, but darn, it feels horrible. And there are no default parameter values, and the error hanling smells bad, and no real stack trace in production. And the "object orientation" syntax, adding some ugly reference to each function. And the pointers...

It took me back to my C/C++ days. Like programming with 25 year old technology from back when I was in university in 1999.

pjmlp a day ago

And then people are amazed for it to achieve compile times, compiled languages were already doing on PCs running at 10 MHz within the constraints of 640 KB (TB, TP, Modula-2, Clipper, QB).

  • remus a day ago

    > [some] compiled languages were already doing on PCs running at 10 MHz within the constraints of 640 KB

    Many compiled languages are very slow to compile however, especially for large projects, C++ and rust being the usual examples.

    • adastra22 a day ago

      It is weird to lump C++ and Rust together. I have used Rust code bases that compile in 2-3 minutes what a C++ compiler would take literally hours to compile.

      I feel people who complain about rustc compile times must be new to using compiled languages…

      • pjmlp a day ago

        There is a way to make C++ beat Rust though.

        Make use of binary libraries, export templates, incremental compilation and linking with multiple cores, and if using VC++ or clang vLatest, modules.

        It still isn't Delphi fast, but becomes more manageable.

    • pjmlp a day ago

      True, however there are more programming languages than only C++ and Rust.

    • gf000 a day ago

      Well, spewing out barely-optimized machine code and having an ultra-weak type system certainly helps with speed - a la Go!

      • remus a day ago

        That's a reasonable trade-off to make for some people, no? There's plenty of work to be done where you can cope with the occasional runtime error and less then bleeding edge performance, especially if that then means wins in other areas (compile speeds, tooling). Having a variety of languages available feels like a pretty good thing to me.

  • rollcat a day ago

    That's a bit unfair to the modern compilers - there's a lot more standards to adhere to, more (micro)architectures, frontends need to plug into IRs into optimisers into codegen, etc. Some of it is self-inflicted: do you need yet-another 0.01% optimisation? At the cost of maintainability, or even correctness? (Hello, UB.) But most of it is just computers evolving.

    But those are not rules. If you're doing stuff for fun, check out QBE <https://c9x.me/compile/> or Plan 9 C <https://plan9.io/sys/doc/comp.html> (which Go was derived from!)

    • pjmlp 10 hours ago

      Indeed, and thankfully there exist languages like D and Delphi to prove as being a modern compiler and fast compilation times are still possible 40 years later.

    • bsder a day ago

      > That's a bit unfair to the modern compilers

      It's really not. Proebsting's Law applies.

      Given that, compilers/languages should be optimized for programmer productivity first and code speed second.

nine_k a day ago

If you want a nice modern compiled language, try Kotlin. It's not ideal, but it's very ergonomic and has very reasonable compile times (to JVM, I did not play with native compilation). People also praise Nim for being nice towards the developer, but I don't have any first-hand experience with it.

  • lisbbb 19 hours ago

    I have only used Kotlin on the JVM. You're saying there's a way to avoid the JVM and build binaries with it? Gotta go look that up. The problem with Kotlin is not the language but finding jobs using it can be spotty. "Kotlin specialist" isn't really a thing at all. You can find more Golang and Python jobs than Kotlin.

lisbbb 19 hours ago

But it's not--Go is a thoroughly modern language, minus a few things as noted in this discussion. But it's very and I've written quite a few APIs for corporate clients using it and they are doing great.