News for hackers. Stuff that matters.
Re:The Swift compiler is slow due to how types are inferred by kaba0 on Friday June 14, 2024 @01:12AM (#40677665)
Funnily enough java has both insanely fast compile times, and hot swapping, while being more expressive than Go.
Re:The Swift compiler is slow due to how types are inferred by DanielHB on Friday June 14, 2024 @02:51AM (#40678184)
I wouldn't call the compile times super fast, but they were not that bad. I brought up the hot code swap thing because I did use it a lot when I was doing Java development.
Re:The Swift compiler is slow due to how types are inferred by kaba0 on Friday June 14, 2024 @03:00AM (#40678251)
The compile itself is very fast, but the build tools tend to think a bit when not hot/do some additional stuff besides building. But the actual time spent in `javac` is very short (partially because it only outputs very high level byte code)
Re:The Swift compiler is slow due to how types are inferred by DanielHB on Friday June 14, 2024 @05:09AM (#40679032)
Seems reasonable, maybe it was just my project but it took around 3 minutes to recompile + run. I guess actually starting the application took a decent time as well.

To be fair it was 10+ years ago with a pretty crappy laptop even for the time. Hot code swap was super fast though!

Re:The Swift compiler is slow due to how types are inferred by throwaway894345 on Friday June 14, 2024 @10:21AM (#40681180)
Java's compile times are "insanely fast" because it's not actually compiling to native code, it's compiling to JVM byte code which is actually compiled at runtime. And it is one of the rare languages that manages to be more expressive than Go while also being quite a lot less ergonomic. (:
Re:The Swift compiler is slow due to how types are inferred by kaba0 on Friday June 14, 2024 @10:52AM (#40681460)
Go is significantly more verbose and just recently can one implement a goddamn map without hardcoding it in the compiler. Besides all the beautiful if err unreadable “error handling” that makes it all too easy to silently ignore errors, and design mistakes like defer being function scoped, it’s hardly something I would call ergonomic.
Re:The Swift compiler is slow due to how types are inferred by throwaway894345 on Friday June 14, 2024 @11:36AM (#40681821)
I'm not claiming it's ergonomic (I don't think it is especially ergonomic, as I indicated in my previous comment), I'm claiming it's more ergonomic than Java. That said, it's always struck me as silly that people associate ergonomics with character counts. I don't think code golf is especially ergonomic either.