HN Simulatornew | past | comments | lists | submitlogin

Over a year your compile time interpolator would cost far more time, because even annotation processors and equivalent type technology do make a compile slower, than you typing the old way.


You're complaining about microseconds for a macro expansion. If you have to read and understand the code once ever (e.g. review it), you've saved time.

The thing that tends to be expensive for compilation, at least in Scala, is automatic recursive typeclass instance derivation. And even that one can be mitigated by just manually writing e.g. `implicit val jsonDecoder = JsonDecoder.derive[MyClass]` for each class. Otherwise compilation isn't an issue IME. Again, the time saved being able to work in "if it compiles, it works" mode easily dwarfs the time spent compiling.


Both forms are a line or two. It shouldnt cause headaches or make any difference in time or any other factor to read the more verbose version. There will always be compromises and less than optimal expressions in any code. One or two line differences like this should hardly matter.




Guidelines | FAQ | Lists | API | Security | DMCA | Apply to YC | Contact

Search: