Programming thread

Java's ridiculous type system is the unmistakable footprint of smelly research people. In fairness, they didn't have as many high-profile mistakes to learn from in 1994 as we do today - most notably Java itself.
Most issues in Java I think are overblown or can be overcome with a good IDE + code snippet/templates. Generics in Java and Type Erasure is one of those things which are unfixable and remain to this day one of the biggest slopfests in Java coding. They took pains not to break backwards compatibility when introducing generics I think to this day remains the biggest mistake of the language. Contrast this to C#, where they introduced several breaking changes to implement generics all the way down to the byte code in 2.0. C# has better performance with generics along with the other benefits like type safety and reflection.
 
Most issues in Java I think are overblown or can be overcome with a good IDE + code snippet/templates. Generics in Java and Type Erasure is one of those things which are unfixable and remain to this day one of the biggest slopfests in Java coding. They took pains not to break backwards compatibility when introducing generics I think to this day remains the biggest mistake of the language. Contrast this to C#, where they introduced several breaking changes to implement generics all the way down to the byte code in 2.0. C# has better performance with generics along with the other benefits like type safety and reflection.
Oh yeah, you reminded me.

I remember the first time I found out that you can't use primitives in Java generics and I had to pick my jaw up off the floor. LITERALLY WHAT
 
  • Agree
Reactions: Strange Looking Dog
Oh yeah, you reminded me.

I remember the first time I found out that you can't use primitives in Java generics and I had to pick my jaw up off the floor. LITERALLY WHAT
It's possible you misunderstand generics. You wrote earlier:
Compilers treat generic code as a template for making new code (hence the name in C++)
This isn't true, and hasn't been true historically, going back at least to ML in the 70s. Generics in Java (and I think in just about every other language with generics) are a mathematically sound type-system extension, and have nothing to do with code expansion. One property generics normally have is that the type checker can prove that a function which uses generics is type-correct without knowing anything about how it's actually instantiated. This is not true of C++, and is something that I consider to be a massive flaw in its approach to generics, one which is still waiting to be fixed with Concepts.

Furthermore, it's generally expected that type-checking of generics should always halt. Personally, I want my type-checker to halt pretty quickly. I also want it to support separate compilation, so it's not forced to re-expand templates from other modules every time I make a change in how I've used them. The approach taken by C++ here is directly responsible for its long build times. In Java, separate compilation is forced on you because it's expected that everything is hot-loadable.

Finally, in both Java and C#, the designers were upfront in saying that they wanted to support polymorphic recursion. It's simply not possible to do this by treating generics as templates: it will always just send the compiler into an infinite loop.

When generics are not implemented as code expansion, you need to think harder about how they are implemented, especially in languages like Java and C# which are supposed to support runtime type information and runtime loading of classes. Java made things somewhat harder by not putting generics into the CLR. But the other constraints they were working with are real constraints on absolutely solid type theory.
 
This wasn't meant as a defense of Java. I don't like the language itself and I don't program in it for a living. I do use the JVM which makes for a nice machine and follow new features introduced in new Java versions. Records, virtual threads, primitive type switch cases, are all good and cultured features which come in after having been thourouly designed. I'm impressed with the recent advances. If I wrote Java my code would probably look like it was written by a lunatic to a regular Java programmer, but those are nice, imo.
 
  • Like
Reactions: Marvin
It's possible you misunderstand generics. You wrote earlier:
This isn't true, and hasn't been true historically, going back at least to ML in the 70s. Generics in Java (and I think in just about every other language with generics) are a mathematically sound type-system extension, and have nothing to do with code expansion. One property generics normally have is that the type checker can prove that a function which uses generics is type-correct without knowing anything about how it's actually instantiated. This is not true of C++, and is something that I consider to be a massive flaw in its approach to generics, one which is still waiting to be fixed with Concepts.

Furthermore, it's generally expected that type-checking of generics should always halt. Personally, I want my type-checker to halt pretty quickly. I also want it to support separate compilation, so it's not forced to re-expand templates from other modules every time I make a change in how I've used them. The approach taken by C++ here is directly responsible for its long build times. In Java, separate compilation is forced on you because it's expected that everything is hot-loadable.

Finally, in both Java and C#, the designers were upfront in saying that they wanted to support polymorphic recursion. It's simply not possible to do this by treating generics as templates: it will always just send the compiler into an infinite loop.

When generics are not implemented as code expansion, you need to think harder about how they are implemented, especially in languages like Java and C# which are supposed to support runtime type information and runtime loading of classes. Java made things somewhat harder by not putting generics into the CLR. But the other constraints they were working with are real constraints on absolutely solid type theory.
You are way way off into the weeds here. Typing MyFunction<int>() works in C# and it will not work in Java (last I worked with it for 2 straight years anyway). That was my only point.

I don't care about large spiels on mathematical theory. If it's a pain to work with, it's a pain to work with.
 
The JVM always struck me as useless, especially because compilers of regular code like C or other languages has proven to be incredibly efficient. At the most, you can just recompile your code when you update it and lock in any such improvements. I also agree with @Rusty Crab that Java was by far the hardest language to learn, not only the syntax but which methods to use with the base classes and the standard library. For lots of uses I would rather code it myself in C or C++ lmao

Most issues in Java I think are overblown or can be overcome with a good IDE + code snippet/templates.
I use vim for C, Python, Go, shell scripts, writing html/css/other programming documents, but could never have done that for Java. If a language needs an IDE to hold the programmers hand more than googling any questions you have, that's because it's unnecessarily obtuse and unintuitive.
 
The JVM always struck me as useless, especially because compilers of regular code like C or other languages has proven to be incredibly efficient. At the most, you can just recompile your code when you update it and lock in any such improvements. I also agree with @Rusty Crab that Java was by far the hardest language to learn, not only the syntax but which methods to use with the base classes and the standard library. For lots of uses I would rather code it myself in C or C++ lmao
Actually the issue with Java is that it's too easy at a beginner to mid level. However, once you start trying to make a professional business product that needs to go into consumer hands, you start discovering that polishing the performance of your code is a rather arcane ritual.

Also, if you're coming from another language that allows much more freedom in problem solving, it's going to drive you up a wall.

I use vim for C, Python, Go, shell scripts, writing html/css/other programming documents, but could never have done that for Java. If a language needs an IDE to hold the programmers hand more than googling any questions you have, that's because it's unnecessarily obtuse and unintuitive.
That's true to an extent, but any real world, money making application is going to become so massive that it will realistically require an IDE in order to remain productive.

And it's not just the ability to code in it. You have to remain competitive with your co-workers who are undoubtedly using IDEs. If you're not, they will outpace you by an order of magnitude.
 
I don't care about large spiels on mathematical theory. If it's a pain to work with, it's a pain to work with.
There are 1.6 kinds of people in this world: people who don't want to think back to their half-forgotten 8AM type theory class to remember the definition of "contravariant" just to wrangle some lolcow of a programming language, and niggers.
 
You are way way off into the weeds here. Typing MyFunction<int>() works in C# and it will not work in Java (last I worked with it for 2 straight years anyway). That was my only point.

I don't care about large spiels on mathematical theory. If it's a pain to work with, it's a pain to work with.
And C# supported applying primitive types to generic code by adding them to the CLR, where Java opted for backward compatibility. The difference shouldn't cause you to go "LITERALLY WHAT" (unless you're confused about what generics are). Apologies for the mathematical spiel. Have you considered writing Go?
 
I use vim for C, Python, Go, shell scripts, writing html/css/other programming documents, but could never have done that for Java. If a language needs an IDE to hold the programmers hand more than googling any questions you have, that's because it's unnecessarily obtuse and unintuitive.
Holy shit you're so cool! can I subscribe to your newsletter?

IDEs are just tools and you don't get brownie points for knowing how to use a tool. Show me something complicated or successful you've built and I'll be more impressed over your ability to vim your way through a 300 line bash script.

Also, there's nothing preventing you from using vim with Java, that's absurd.
 
  • Optimistic
Reactions: Coffee Shits
Holy shit you're so cool! can I subscribe to your newsletter?

IDEs are just tools and you don't get brownie points for knowing how to use a tool. Show me something complicated or successful you've built and I'll be more impressed over your ability to vim your way through a 300 line bash script.

Also, there's nothing preventing you from using vim with Java, that's absurd.
Nah I don't see what the point of an IDE is...except to auto-complete method names for me, which is why i use eclipse for Java. It doesn't tell me anything that the compiler won't.

Now on the other hand, if there's an IDE that lets me use curly brackets for code blocks in python and converts it to indentation, sign me the fuck up.
 
  • Agree
Reactions: Marvin
I didn't want to mark your entire post with a "disagree" sticker, because I strongly agree with the first part and strongly disagree with the second, so pardon my verbal sperging instead.

I use vim for C, Python, Go, shell scripts, writing html/css/other programming documents, but could never have done that for Java. If a language needs an IDE to hold the programmers hand more than googling any questions you have, that's because it's unnecessarily obtuse and unintuitive.
That's true to an extent, but any real world, money making application is going to become so massive that it will realistically require an IDE in order to remain productive.

And it's not just the ability to code in it. You have to remain competitive with your co-workers who are undoubtedly using IDEs. If you're not, they will outpace you by an order of magnitude.
My experience tells otherwise - in general, I get more productive when writing C or C++ in non-IDE type editor than I ever will using either VS, VSCode or some JetBrains-made abomination. That experience holds significantly when comparing to coworkers in the few office jobs that I had the (un)pleasure to perform - code monkeys used VSCode almost exclusively, more senior programmers went more and more towards minimization of IDE-related sources of distraction, finally ending at vim (which, personally, I strongly dislike and would not use at all).

Note: I'm not saying IDEs are bad per se. And I do envision scenarios when their features might boost my productivity (such as generating many classes and boilerplate code Java-style or doing basic refactoring), though in my line of work such occurrences were scarce.

If there's one type of activity where I'd say that IDEs are actively harmful, that would be teaching programming.
 
  • Agree
Reactions: Marvin
I didn't want to mark your entire post with a "disagree" sticker, because I strongly agree with the first part and strongly disagree with the second, so pardon my verbal sperging instead.


My experience tells otherwise - in general, I get more productive when writing C or C++ in non-IDE type editor than I ever will using either VS, VSCode or some JetBrains-made abomination. That experience holds significantly when comparing to coworkers in the few office jobs that I had the (un)pleasure to perform - code monkeys used VSCode almost exclusively, more senior programmers went more and more towards minimization of IDE-related sources of distraction, finally ending at vim (which, personally, I strongly dislike and would not use at all).

Note: I'm not saying IDEs are bad per se. And I do envision scenarios when their features might boost my productivity (such as generating many classes and boilerplate code Java-style or doing basic refactoring), though in my line of work such occurrences were scarce.

If there's one type of activity where I'd say that IDEs are actively harmful, that would be teaching programming.
A while back I spent some time using Odin, and I found that in a language that doesn't try to strong-arm you into building more abstractions than you need, and especially in a language that doesn't try to strong-arm you into spreading your project out over dozens of files, I didn't need an IDE at all. Any shitty text editor is good enough to do non-trivial work, even something as bare-bones as notepad.exe. Of course you want the best code editor you can get, especially on large projects, but that's besides my point.

Part of Java's sickness is that its design makes the IDE feel like a must-have, and yet the language is far less capable than languages that don't need IDEs. Java barely works as a beginner's toy language, and yet it needs so much infrastructure to carry its bloated corpse. What the fuck, right?
 
I think I should clarify that when I'm talking about IDEs in a "large project", I'm talking about a million lines or so. That may not have been clear from the context.

My experience tells otherwise - in general, I get more productive when writing C or C++ in non-IDE type editor than I ever will using either VS, VSCode or some JetBrains-made abomination. That experience holds significantly when comparing to coworkers in the few office jobs that I had the (un)pleasure to perform - code monkeys used VSCode almost exclusively, more senior programmers went more and more towards minimization of IDE-related sources of distraction, finally ending at vim (which, personally, I strongly dislike and would not use at all).
I probably spoke too broadly just pulling from my own history. I've only worked in small-mid sized companies and they simply don't have the delegation machinery for taking the bulk of writing off your hands. I've heard it's not like that at larger companies (eg: junior employees write the boilerplate and senior employees design the systems and write the tricky bits of code that go into the framework).

IF I am working on something very thought intensive but not necessarily large, 'distraction free' editors can provide a 'zen' experience and boost my productivity for the opposite reasons. I often do that when I have to write a particularly tricky algorithm. If it gets bad enough, I go back to full pen and paper mode.

Note: I'm not saying IDEs are bad per se. And I do envision scenarios when their features might boost my productivity (such as generating many classes and boilerplate code Java-style or doing basic refactoring), though in my line of work such occurrences were scarce.
Those are mostly the kind of scenarios I'm talking about yeah. In my specific line of work, if you're writing something, you are writing it, together with all the horrible boiler plate that comes with it. AI code generation and IDEs can increase your productivity immensely with that.

If there's one type of activity where I'd say that IDEs are actively harmful, that would be teaching programming.
Probably correct, but I'd say that's less due to the autocompletion and more of them completely hiding the compiler chain from you. You just press a button and now you have a program. It's magic!

A while back I spent some time using Odin, and I found that in a language that doesn't try to strong-arm you into building more abstractions than you need, and especially in a language that doesn't try to strong-arm you into spreading your project out over dozens of files, I didn't need an IDE at all. Any shitty text editor is good enough to do non-trivial work, even something as bare-bones as notepad.exe. Of course you want the best code editor you can get, especially on large projects, but that's besides my point.
That's one thing I forgot to mention: one of the biggest benefits of IDEs is their fuzzy search capabilities. Not having to stop and think about where something is or where you left it on the file system is an incredible leg up. Just press a hotkey and jump to literally anything in under 4 seconds. Every symbol, every comment, every string. I keep being told "lol just remember where everything is bro". Sorry, bro I can't do that with 18,000 text files.
 
Last edited:
That's one thing I forgot to mention: one of the biggest benefits of IDEs is their fuzzy search capabilities. Not having to stop and think about where something is or where you left it on the file system is an incredible leg up. Just press a hotkey and jump to literally anything in under 4 seconds. I keep being told "lol just remember where everything is bro". Sorry, bro I can't do that with 18,000 text files.
VIM can do that.
 
  • Like
Reactions: Besachf Jhakut
VIM can do that.
Can you show me a demonstration of that? It would be news to me.

also, really not trying to be a smartass. I love vim but gave up on trying to use it because of the absurd level of tweaking you have to do to bring it to a sane IDE level.
 
Back