Cay Horstmann, a computer science professor and author, hosts his programming books and notes on Java, C++, and Scala.
HN commenters praise his Scala for the Impatient and his teaching, and point to his Scala page as a good introductory text.
I would point to the Oracle vs. Google Supreme Court decision.
https://www.cnn.com/2021/04/05/tech/google-oracle-supreme-court-ruling/index.html
> Writing for the Court, Breyer said that while it is difficult to apply traditional copyright concepts in the context of software programming, Google copied “only what was needed to allow users to put their accrued talents to work in a new and transformative program.”
> A world where Oracle was allowed to enforce a copyright claim, Breyer added, “would risk harm to the public” because it would establish Oracle as a new gatekeeper for software code others wanted to use.
The fair use tests that were used in the SCOTUS case, I believe, would fall on the side of "developers using GPT or Copilot to generate code do not generate substantial parts of the code and are below the amount of work needed to show sufficient creativity in writing it."
The example is https://horstmann.com/unblog/2010-11-15/NodePolicyImpl.html
If that is not a copyright violation and considered to be fair use, then the code generated by GPT or Copilot likely also falls in the the same bucket.
I don't necessarily agree with that, but that's my reading of the tea leaves.
There are tradeoffs with all languages. C++ avoids the GC, but you then have to make sure you know how to avoid the common pitfalls of that language.
We use C++ at Scylla (saw that we got a shout-out in the blog! Woot!) but it's not like there isn't a whole industry about writing blogs avoiding C++ pitfalls.
C++ pitfalls through the years...
• https://www.horstmann.com/cpp/pitfalls.html (1997)
• https://stackoverflow.com/questions/30373/what-c-pitfalls-should-i-avoid (2008)
• http://blog.davidecoppola.com/2013/09/cpp-pitfalls/ (2013)
• https://www.typemock.com/pitfalls-c/ (2018)
I am not saying any of these (Go, Rust, C++, or even Java) are "right" or "wrong" per se, because that determination is situational. Are you trying to optimize for performance, for code safety, for taking advantage of specific OS hooks, or oppositely, to be generically deployable across OSes, or for ease of development? For the devs at Scylla, the core DB code is C++. Some of our drivers and utilities are Golang (like our shard aware driver). There's also a Cassandra Rust driver — it'd be sweet if someone wants to make it shard-aware for Scylla!
Dr. Horstmann was my advisor in college, San Jose State.
I just loved his lectures, very dry sense of humor, and extremely funny.
He was just getting started writing books in the early 90s. He has this awesome way of thinking about programming, that I imparted to my own students when it came my turn to teach programming. I wish there some videos of his classes that I could go back to and share with people.
Good website also, https://horstmann.com/
The picture on the website with him in the row boat has a funny story with it. When asked why he is in a row boat, he would reply, "Students are in the row boat with me, learning to program. At some point I push them out of the boat into the eel infested lake. The ones who are clever enough to make it back to the shore will be good programmers." All of this said with a faint hint of a German accent and a sly smile.
If you happen to read this, Dr. Horstman. I made it to shore. Thanks! It has been an awesome journey!
I'm in the same boat. It's an old joke that Java tried to kill off printf style formatting but had to bring it back because it's a really great idea:
1980: C
printf("%10.2f", x);
1988: C++
cout << setw(10) << setprecision(2) << showpoint << x;
1996: Java
java.text.NumberFormat formatter = java.text.NumberFormat.getNumberInstance();
formatter.setMinimumFractionDigits(2);
formatter.setMaximumFractionDigits(2);
String s = formatter.format(x);
for (int i = s.length(); i < 10; i++) System.out.print(' ');
System.out.print(s);
2004: Java
System.out.printf("%10.2f", x);
2008: Scala and Groovy
printf("%10.2f", x)
(from http://www.horstmann.com)
To complete the circle I'd add:
2009: Go
fmt.Printf("%10.2f", x)
I read through Scala for the Impatient when I was initially learning Scala a few years ago. It's relatively new and written for version 2.10. Scala is on 2.11, but compared to 2.09 → 2.10, the changes are minimal. The book itself cuts out a lot of the BS and gets down to what a user wants to know about the language (features, syntax, how it differs from Java, etc).
Most Scala books were written pre 2.10, which makes them outdated enough that it would be hard for many new adopters of the language to get much out of them.
First 1/3 of the book is free online. The entire book is only $20 or so on Amazon.
http://www.horstmann.com/scala/index.html
Which issues did you experience with http://www.artima.com/pins1ed/? (It's a slightly older version, but there aren't many changes which would be important for newbies.)
Partially free:
Atomic Scala also has at least a free sample, which expects basically no programming experience at all: http://www.atomicscala.com/free-sample/
Scala for the Impatient is also nice, but is more intended to help programmers get up to speed with Scala as fast as possible: http://www.horstmann.com/scala/index.html