There's an old saying among military planners: 'Amateurs discuss tactics, professionals discuss logistics'. I'm not exactly sure what the analogy is with language design, but it's certainly 'Amateurs discuss syntax' because boy, do they...
I feel that was a (well-deserved) swipe against this subreddit :D
Since we’re talking about syntax, and you mentioned that the proposal for collection literals failed for syntactic reasons (reserves too much syntax for too little gain)… may I propose an idea? (Yes, I remember, ideas are cheap but bare with me anyway)
Just use target typing! That is, {1,2,3} on its own is a syntax error, but I can use it when initializing an int[]. Why not a CopyOnWriteArraySet of int? Just need some rules for what this desugars into, maybe with a fallback chain (prefer static of() method if exists, else constructor, else sequence of calls to add(), or something)
Fine you don’t want syntax pestering? I can pester about something even more annoying. Ever since the mailman upgrade, there’s no self service way to unsubscribe from a Java mailing list, or switch to digest mode. This discourages outsider contributions, since they can’t count on being able to ever unsubscribe so they’re don’t dare to subscribe in the first place.
Well, you have to admit that a lot of people still for some reason care about the exact syntax details and with the straight face discuss that as one of the reasons to prefer one language over the other.
That is insane, considring the fact that AI now writes a lot of code.
47
u/JustAGuyFromGermany 6d ago
I feel that was a (well-deserved) swipe against this subreddit :D