Hacker News new | past | comments | ask | show | jobs | submit login

Great points, but it's actually much simpler than that: if you want static types, you have already eliminated the majority of HN darlings (JS, Python, and Ruby). Where do you? Most developers turn to C++, Java, or C# (not Haskell or F#, for example), and of these, Java and C# are both great for productivity and not daunting for someone just starting out, unlike C++.

There was a period after 200x where developers managed to throw out a bunch of babies along with the bathwater when they rejected Java, UML, SQL, and everything else that was used in 199x. After all, these are all literally from the last century, so they must be "uncool", amirite? /s

The preference for dynamic or duck typing in the name of productivity has always rubbed me the wrong way. To keep it brief, my defense / elevator pitch for static typing is: "Slow is smooth. Smooth is fast" :-)




> eliminated the majority of HN darlings (JS, Python, and Ruby)

Those were the darlings ten years ago (along with CoffeeScript and Clojure). The pendulum has swung back towards types and now the hip ones are Go, Kotlin, Swift, TypeScript, and (to a lesser extent) Haskell, Hack, Reason, and OCaml.

> Java, UML, SQL, and everything else that was used in 199x.

There was the whole no-SQL fad, but lately, even here, I see a lot of people re-discovering and advocating the relational model. Postgres seems to be hotter than MongoDB today.

Much of what is good about Java lives on in Kotlin and Swift. I agree it is unappreciated with today's eyes. Few remember that it was Java that introduced much of the world to garbage collection, memory safety (!), optimizing JIT compilation, runtime reflection, dynamic loading, high quality static analysis IDEs, etc.

UML is garbage. A visual language designed by non-artists with no aesthetic expertise. It deserves to be forgotten.


> Few remember that it was Java that introduced much of the world to garbage collection, memory safety (!), optimizing JIT compilation, runtime reflection, dynamic loading, high quality static analysis IDEs, etc.

Java is still continuing to lead on technology. In recent years it has introduced the world to low-latency, concurrent copying garbage collectors (C4, ZGC), partial-evaluation Futamura-projection optimizing compilers (Graal/Truffle), and low-overhead continuous deep profiling in production (JFR). I think that lots of people remember that, and care about those things, because Java is not only leading technologically but also in market share.


Asking as someone who cares about aesthetics a lot more than most developers, what does UML have to do with aesthetics? UML is for modeling systems and relationships through agreed upon conventions, and sometimes generating code stubs based on those diagrams. As long as you adhere to the conventions, the aesthetics can be changed as necessary.


It's a visual language. It exists entirely to be consumed by human eyeballs. Aesthetics are the user interface for that process.


But you can customize its aesthetics.


> Great points, but it's actually much simpler than that: if you want static types, you have already eliminated the majority of HN darlings (JS, Python, and Ruby).

Well, if you ignore mypy and consider TypeScript distinct enough from JS to not count, sure, though TS is if anything more of an HN darling than bare JS (Really, none of those languages has been an HN or developer community darling in years, though Python—due to ML and data science—is less horrible uncool than Ruby and JS right now. (And, yeah, Ruby is left out of the “but I have static type checking available” list...till Sorbet is available later this year.)

> Most developers turn to C++, Java, or C#

I'd be surprised if more than half (most) developers using static typing use those languages and not others outside that set.


>> Most developers [from context: who want static types] turn to C++, Java, or C#

> I'd be surprised if more than half (most) developers using static typing use those languages and not others outside that set.

Really? I'd be surprised if it was less than 90%. What is the competition? Go, TypeScript, Swift, Scala, Kotlin, Rust (in rough order of my gut sense for how widely used they currently are)? These are all still very small relative to C++, Java, C#.

If you argue that C has static types, then I guess you're probably right. But it isn't really true that C has static types in the contemporary sense (which I think is perhaps better referred to as "strong" type safety).


> If you argue that C has static types, then I guess you're probably right.

C (like C++) is both statically and weakly typed; strong and static typing are orthogonal axes (dynamic but strongly typed languages are common.) If you mean strong and static when you say static, you need to take C++ off your list.


No, it's (mostly) not about that.

It's about C not having any generics or similar things (like C++ templates), so you need to fall back way more often on void*.

So on that axis Go is roughly as statically typed as C, albeit more strongly typed.

On the other hand C++ is more statically typed than C, but is about as strongly typed (afaik).


Yeah, I kind of wondered about that as I was writing my comment, seems like a fair point.


According to Github: https://github.blog/2018-11-15-state-of-the-octoverse-top-pr...

As it happens, among the statically typed languages, C++, Java, and C# are the top three, with C and TypeScript filling out the top 10 lineup.

That's not saying "more than half", but if you include C onto that list, I would definitely bet against your statement.


While I still like Python, Python and Ruby haven't been darlings of anything in probably the last 10 years. Go, Rust, Swift, and Kotlin are newer statically typed languages that lots of devs on here like though.


This timeline is a bit aggressive for Ruby. The core of my career using Ruby was 10 years ago, and I would still call it "darling" at that point, though the rumblings were beginning. Node.js was first released almost exactly 10 years ago, and (from my perspective) over the next few years marked the first real exodus from people who had previously been all in on Ruby. I missed out on that one because I thought node.js seemed like an immature answer to a question I wasn't asking. But over the next few years, I became increasingly disillusioned with writing big software in a language without good static analysis, and was on board with the mindshare (if not actual employment) exodus toward languages like Go and Rust. So I would say it was more like 5-7 years ago that you started seeing more criticism than love for Ruby in places like this.

And yeah, as other commenters have said, Python is back due to data science / machine learning. (Though I'm hoping there will be a wave of adoption of tools like Julia and Swift for this in the near future; good static analysis will be nice for data science for all the same reasons it is nice for other kinds of software.)


Python's relevance got renewed by the ML frameworks (Tensorflow) and notebooks (Jupyter).


This. Jupyter notebooks, Matplotlib, Numpy, Spyder...all that made Python big again as ML and AI became the new hotness recently and the killer app for Python.

Outside AI, Python is a really good scripting language for both Linux and Windows. My entire industry seems to run off of Python for process automation and analysis. It really is a lingua franca in this space.


I agree. During my Maths + CS studies I've been using mainly MatLab and R, Andrew Ng's famous Machine Learning intro was also taught in MatLab/ Octave. But using just one „proper” general purposing language like Python instead makes way more sense, especially when building software from scratch. Need a custom ERP? Build one with django. A Web Server? Go with flask. Integrating some ML pipelines? Easy.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: