Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
_old_dude_
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
31.
▲
by
_old_dude_
2y ago
Very true, in Java, at least in the last 20 years, inheritance is de-facto deprecated, all new bits and bolts like enums, annotations, lambdas or records do not support inheritance. So you have to use composition.
32.
▲
by
_old_dude_
2y ago
COBOL changes very slowly, once in a decade or two. Python does not offer support of a release for more than 3 years and a half [1]. [1] https://en.wikipedia.org/wiki/History_of_Python
33.
▲
by
_old_dude_
2y ago
I'm using Java Almanac [1]. [1] https://javaalmanac.io/
34.
▲
by
_old_dude_
2y ago
BTW, Saint Louis is the common name of Louis IX not Louis XIV (the Sun King). https://en.wikipedia.org/wiki/Louis_IX_of_France
35.
▲
by
_old_dude_
2y ago
This is similar to the expression tree API of C# so no change in the JVM is required, only cooperation between the java compiler and the reflection API. The code model can be computed by the compiler, inserted in the classfile in a specific
36.
▲
by
_old_dude_
2y ago
They have just changed the angle of attack by baning effective ad-blockers from chrome https://arstechnica.com/gadgets/2024/05/google-starts-deprec...
37.
▲
by
_old_dude_
2y ago
Yes, it's functions vs methods. You can make this explicit like in Python, you can make it implicit but have two kinds of methods, instance methods and static methods like in C++/C#/Java. And you have JavaScript were all func
38.
▲
by
_old_dude_
2y ago
s/jpackage/jextract/g
39.
▲
by
_old_dude_
3y ago
There are so many packages that only work with GODEBUG=cgocheck=0 that practically that door is closed
40.
▲
by
_old_dude_
3y ago
Hello, I do not know if someone from Daft is reading this thread, but you should not use contiguous ids https://daftsocial.com/daftsocial/?id=201
41.
▲
by
_old_dude_
3y ago
We had high hope that unlike SUN, Oracle will listen. > Iterative process please send a link to a video of a designer from Oracle presenting the string templates at a conference. This is not Loom, there is no iterative process. > Pyth
42.
▲
by
_old_dude_
3y ago
Even if I think that Guy Steele is a genius, an argument of authority is always a bad argument. Better listening to the foot soldiers than staying in your high tower. Using '\' instead of '$' does not allow $variable as
43.
▲
by
_old_dude_
3y ago
Sadly escape analysis in Java is weak. In this case, it only works if all the template values do not escape.
44.
▲
by
_old_dude_
3y ago
Yes, you do not get a compile time error, but visually a big STR is front is enough "${variable}" vs STR."${variable}" And editors will use different colors. Using \ or $ is not about backward compatibility but about e
45.
▲
by
_old_dude_
3y ago
You can not use the excuse of the backward compatibility twice. If the string template is prefixed by a processor STR."foo" instead of "foo" then you do not need \{variable} instead of $variable.
46.
▲
by
_old_dude_
3y ago
Both the syntax and the semantics are awful. They are overthinking it. Processor should not require to allocate a list of objects do to string templating. Only STR and FMT get good perf because they are specialized by the compiler.
47.
▲
by
_old_dude_
3y ago
You still need virtual dispatch (or type pattern matching) if there is a variable which can contain either a BDRepo or a LoggedRepo(BDRepo).
48.
▲
by
_old_dude_
3y ago
I'm now retired but headphones were my invibility hat. I was easy for the kids, headphones means daddy is not home, it was harder for my wife.
49.
▲
by
_old_dude_
3y ago
Developers should understand if a dependency use C bindings. But why bother end users with a command line flag. Perhaps there is a manifest entry/flag so the command line flag is not required ?
50.
▲
by
_old_dude_
3y ago
Monad to the rescue Optional.of(op) .filter(v -> !v.cond) .map(v -> op2(v)) .filter(v2 -> !v2.cond) .map(/* do more stuff */) .orElseGet(() -> my_else)
51.
▲
by
_old_dude_
3y ago
You have two kind of concurrent GCs, the ones where the marking phase in concurrent with the application and the ones where the evacuation phase is also concurrent with the application. G1 only does the marking concurrently, the evacuation
52.
▲
by
_old_dude_
3y ago
I remember James Gosling saying, a long time ago, that the whole class should be either mutable or not so you do not need to tag some methods with const. The consequence is that you may define two classes, one non-mutable and one mutable li
53.
▲
by
_old_dude_
3y ago
Or a nuclear power plant https://www.quora.com/The-license-agreement-of-Java-says-You...
54.
▲
by
_old_dude_
3y ago
It's not generational GC, it's generational ZGC. ZGC is a concurrent GC, both the marking phase and the evacuation phase are done concurrently with the program running. A generational ZGC is a generational concurrent GC. MS does n
55.
▲
by
_old_dude_
3y ago
It's prefixed by "STR." so the syntax is different from any existing tools ? It remember me the first proposed syntax for lambdas. Let's hope the next preview will fix that.
56.
▲
by
_old_dude_
3y ago
You need an helper method for that public class Main { private static <T,R> Function<T,R> fun(Function<T,R> function) { return function; } public static void main(String[] args) { v
57.
▲
by
_old_dude_
3y ago
In C#, value types and reference types are two separate kind of types, value types are pass by copy (like C structs) and generics where clauses have coloring (struct constraints [1]). In Java, value types are immutable so the VM can pass by
58.
▲
by
_old_dude_
3y ago
Closing the hierarchy or not depend on the use cases, for an application most hierarchies are closed. For a library most are open. For example, if your application receive JSON objects, you know all of them so, it's a closed hierarchy.
59.
▲
by
_old_dude_
3y ago
It depends if the hierarchy is open or closed. If the hierarchy is open, the behavior is defined in each subtypes and it's easy to add a new subtypes but you can not add a new operation (a new method). That's the OOP way. If the h
60.
▲
by
_old_dude_
3y ago
yes, thanks,
More ›