8/13/2023 0 Comments Eclipse code formatter to intellif![]() ![]() In languages that are word heavy, like Java and C#, nesting expressions deeply does not work very well. A large part of the code google-java-format writes poorly was already poor to begin with. Rightwards drift is generally selfinflicted. Typically, I think the code looks pretty good - especially if you actually avoid writing unnecessarily complex code (particularly deeply nested lambdas, or long lambdas in general), which we think is a good idea anyway.īut anyway, to each their own, if you don't like our tool, don't use it, it's all good :-) (To be honest we never really expected many non-Google projects to use it at all!) I semi-agree with "not really that bad" there are examples that are awful, and we've sure seen em, but those examples are being chosen specifically for being the very worst out there. So far, we've had a number of people volunteer but then drift away, and when we ask them about it they say that they just got used to the behavior and realized it wasn't really that bad. It would be kind of a breach of integrity to go back on that behavior now, wouldn't it? But we still think that someone could figure it out maybe. Without trashing other behavior we liked, that is. Okay, I got into Story Time mode a bit, sorry, but now it's late and I'm tired so the deal is, we just couldn't figure out how to fix the bug. ![]() Once lambdas are here, all the complaints would reach a fevered roar so we would definitely have to fix it then, and everything will be fine!īut everything was not fine. We figured we'd prioritize it appropriately, get to it soon enough, and everything would be fine. The dups and the comments and the CC-me's rolled in. So what did we do, we just filed a bug, and titled it "Override the rectangle rule in certain cases where the rectangle overlap would be very small". Structure-revealing code turns out to be readable code, and our users kept preferring it.Īside from the times when it sucked really bad. (Google takes code readability pretty seriously.)Įventually it was clear that google-java-format was pulling ahead, and it was clear that the primary reason for that was The Rectangle Rule - a principle I'd vomited forth one day that somehow had gone the distance. We'd run trials, and for every discrepancy, we'd find out what our users liked best, and all three groups would have the chance to tweak their formatter (if possible), and we'd bake again, and repeat. ![]() I was representing in the JSR-335 working group at maybe roughly the same time we were creating GJF! But we managed to punch ourselves in the face anyway.įirst it helps to understand that we developed the formatter through a really exhaustive process involving an ongoing "bake-off" against both a modified Eclipse formatter and a modified clang-format. Learn Programming Java Help ← Seek help here Learn Java Java Conference Videos Java TIL Java Examples JavaFX Oracle JVM LanguagesĬlojure Scala Groovy ColdFusion Kotlin Want to practice your coding?ĭailyProgrammer ProgrammingPrompts ProgramBattles List of useful Frameworks / Libraries / Softwareīut here's the funny part. If you have any questions, please do not hesitate to ask them! Related Sub-reddits: Some vendors will be supporting releases for longer than six months. If you would like to download Java for free, you can get OpenJDK builds from the following vendors, among others:Īdoptium (formerly AdoptOpenJDK) RedHat Azul Amazon SAP Liberica JDK Dragonwell JDK GraalVM (High performance JIT) Oracle Microsoft With the introduction of the new release cadence, many have asked where they should download Java, and if it is still free. Join us on IRC #reddit-java Where should I download Java? No surveys, no job offers! Such content will be removed without warning.No programming help questions here! These should be posted in /r/javahelp. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |