You couldn’t find a gui designer for intellij, so you consider rewriting the whole application? in C++?!
Would seem easier to learn that ui framework.
For UI maybe look into javafx as an alternative. I haven’t used it, so can’t tell how the design process goes. But it seems to be the only current ui framework for Java.
Easy access to small snippets of code you often need, but putting them in their own library would be crazy.
Depending on the IDE snippets can also move parts of the code around: (intellij live templates)
The variable is set once, but the if expression is still evaluated every time (unless the compiler can optimize it)
(edit after skimming the article: yes,using the variable would solve the problem of the last example)
So there would be the branching overhead in every iteration. But that’s something the cpu branch prediction should cover, especially since the taken branch will be identical in every loop.
Same also applied to the implied condition to break the for loop (only the first few and last iteration should be wrong predictions)
A compiler has mostly fixed rules for translation. The English language often is ambiguous and there are many ways to implement something based on a verbal description.
Programming by using the ai as a “compiler” would likely lead to many bugs that will be hard to impossible to trace without knowing the underlying implementation. But hitting compile again may lead to an accidental correct implementation and you’d be none the wiser why the test suddenly passes.
It’s ok as an assistant to generate boilerplate code, and warn you about some bugs / issues. Maybe a baseline implementation.
But by the time you’ve exactly described what and how you want it you may as well just write some higher level code.
Think of it more like bigger building blocks rather than single use functions. If there is an issue with the pizza arriving burnt black at the customer you don’t want to read through the logic for making the dough and adding toppings if the most likely cause is the oven.
Sure, you could add comment blocks to mark the sections. But you can’t easily jump to that exact point. With function names you can easily skim over the unimportant calls, or go through a list of functions/methods in the file and jump there directly. With comments that’s not a standard feature in IDEs.
Also that function does not scale well if you have more than 2 options of toppings. Maybe some are not compatible and logic needs to be added that you don’t use pineapple and banana on the same pizza, for example.
But I understand your argument about following through multiple layers of abstractions. That’s something that irritates me as well a bit, if you follow a function, that does nothing, but pass the same parameters through another function and return the result.
No guard clauses, or changes to the data, just 1:1 pass-through. And this them goes 2-3 levels deep before reaching real code again. Bonus of they all are in different files too.
Assembly would be lower. You have more complex / direct instructions in assembly. Brain fuck is pretty much just a pure turing machine, and has 8 instructions.
X86 has ~ 1000 + variants. Even ARM with a smaller instruction set has 232 instructions.
In brain fuck to set a number you’d have to count up (or down - underflow) to that number. In assembly you just set it.
Somewhere I’ve read that current assembly code with Makros should be similar to writing C.
Usually a translation system might return the key value if the translation is missing. By translating with “untranslated” as a default you’d get just that text filled as fallback.
Unless you reinvent the wheel for lookup and can just ignore your magic value, or put an if on every value lookup.
Might be a risk there.
It’s possible to write well organized PHP projects but it takes discipline, it doesn’t happen organically, and its really hard to fix once the project has grown significantly.
That applies to most languages, that you can write an awful unmaintainable mess. Especially when the project started by someone with little experience, or no knowledge about suitable design patterns.
Professionally I work across multiple OS’s and architectures so all .NET languages are kinda no-go’s. That’s where C++ really shines.
How about Java?
If it’s a microservice architecture using something like openapi and code generators could be a solution. Then the proper classes / types are created during the build step.
Does not avoid the fields being unused, or service B using an older version before being rebuild.
The approach would be similar as a library, but works across different languages while changing the definition only on one place.