I fully disagree with Java as a starting point and it was an interesting conversation with the teacher.

Apparently, "College Prep" courses more or less determine that Java is the language that they should use.

His teacher thought it was stupid as well, but sometimes your hands are tied. That's what the schools are using as a starting metric though.

He was apparently the only person in the class that said he wanted to do software engineering. Don't worry, he'll be a polyglot before he reaches college.

I learned Java in uni and think it's a fine language to start with. It's also been modernized a lot in the past decade, and if you really want a more modern language it's easy to transition to Kotlin.

I'd take Java over Python or JS any day. It wins on performance, it wins on type system, js is just a plain trash language not at all suited for general purpose programming (TS solves some problems but not all and it has its own problems) and python is fineish but it's slow and just kind of icky, I'd never do serious software development in python. It's fine for small scripts and notebooks and such, we learned python as part of our math classes while the programming classes focused primarily on Java. We also had a class on web development using JS, ML using Python and windows programming using C++ and C#.

I struggle to see any significantly better candidates for a first language than Java. Sure you could go with C but nobody really uses it any more outside of niches. C++ is out, too much stuff. I really like C#, it's my daily driver and I wouldn't mind it as a first language but I think Java is more approachable for beginners. Less confusing syntax to learn. I don't know Go but maybe that could be an alternative? Other than that I'm a bit out of options.

Java is a fairly simple language that's easy to learn and allows teaching a lot of important concepts that will be useful in other languages moving forward. That's a big thing I think, it's not meant to be the only language. The word polyglot is used some times, to me it just means programmer. I don't know any competent developers who only know one language. You end up learning multiple and I think Java is a good entry point.

C# is amazing. Decisions at the education level were made well before it went cross-platform though (FWIW, I've been using it since before v1.1).

Would be interesting in what confusing syntax you're referring to. I think one of the beauties of it is that it's additive. You can program plenty of simple stuff in it with conventional style code, but there's a lot of syntactic sugar available that makes things so easy when you need to start scaling things.

I agree, C# is my language of choice and I've been using it professionally for over 5 years. I use it for personal projects as well.

I'm referring to all the stuff C# has that Java doesn't. Async, ref/in/out keywords, extension methods, linq, lots of stuff. Maybe it's not a big deal, like I said I wouldn't really mind it. I just think Java is a bit simpler in this regard which is an advantage for beginners.

Some differences where I prefer java are checked exceptions and imports. C# usings are ambiguous, it can be difficult to figure out where things are coming from for code samples outside an IDE. And checked exceptions are just good IMO. I've never seen why people dislike them, having used Java and C# I think Java does it better. It's easy to miss exceptions in C#, I wish library developers could use checked exceptions to tell me which exceptions I should worry about.

Anyway both languages are great first languages and great general purpose languages. Highly recommend both.

Thanks for taking the time to respond. Ultimately though, most of those aren't required from the beginning, but the syntactic sugar, abstractions, and performance gains from them are amazing.

You probably already know, but I'll opine a little bit about extension methods. I use them a lot.

Entities > Repositories > Functionality. All split out.

- Entities (pretty much just gets and sets, nothing more than necessary).

- Repositories via extensions to determine where the data comes and goes from (some data comes from SQL, some from Redis, some from Postgres, doesn't matter since it's split out) and any particular queries you need for optimizing things.

- Functionality via more extensions without adding additional code to the entities.

Separation of purpose/use.

I may or may not have completely replaced our data layer in the middle of the height of our season with no interruption. Little bit passionate about this one.

Would you happen to have something like a github repo with examples of those repositories? I'd be interested in seeing that.

Personally I'm not a big fan of copious extensions. I use them some times but I'd describe my usage as sparingly.

I wish. It's on Github, but my hands are tied and I can't share them since it's someone else's property now (hooray for exits, I think).

It's mostly a thought process...

I have or need something (entity), lets get data about it (repository/extensions), we need to do something with this now (only extensions).

Lots of "static" and "this" involved, but the separation and eventual simplicity makes it worth the effort.

Edit: I tried going through some of them to anonymize some for examples, but it felt like treading in dangerous territory.

Java's a pretty good beginning programming language. Outside of the mystical incantation of `public static void main(String[] args) {` and what the difference between `new ArrayList` and `ArrayList.new()` is (I still don't know but I haven't really touched it since college), it's a good statically typed imperative language that you can throw objects and functional stuff into when it's time, isn't going to give you weird errors about indentation, has just enough pointers for you to learn how to avoid a `NullPointerException`, does things pretty "conventionally" (ie, there's not a lot in Java that doesn't also show up in other languages), and is easy to compile and run (when you're not using 3rd party libraries, which students in something like a Data Structures and Algorithms class aren't going to be using). Ideally you have another class teaching you another language too so you get the double bonus of learning what a language is and what a language isn't, and Python's good for that, but by itself Java's fine

> Outside of the mystical incantation of `public static void main(String[] args) {`

I don't think it's mystical. If you don't have an instance of the class yet, you need a starting point and static fills that void (lol. I'll show myself out)

My first programming class was Java. That was 8 years ago. Maybe the curriculum designers thought Java would be relevant for the workplace? The education system always lags several years behind industry trends.

My first programming was also Java. That was...27 years ago! That's some lag.

> 27 years ago!

Sometimes, I feel like I'm the only old guy on here. BASIC, VB6, .NET, and some Java along the way.

Too many new ones to list, although that might be a whole other problem in itself.