Live data from Hacker News

What was the last breakthrough in computer programming? (2019)

quora.com

201–210 of 226 posts

Re: What was the last breakthrough in computer programming? (2019)

#201
post #83

Earlier quoted context omitted.

It sounds like you and Alan Kay are both expecting novel problems to be solved by new programming languages. That is an extremely inefficient way to do it: you need to come up with new compilers, documentation, standard libraries, communities, etc. Instead, programming languages have become general enough that most new problems are being solved within existing languages, instead of by inventing new ones. I have no id…

That's not quite it. Let me explain... The first computer language I used was BASIC. It was excellent for what it was, but clearly it had a limit on how much you could do with it, on account of it missing amenities like named functions, variable scopes, etc. A 'function' was simply a line further down the program that you branched to using GOSUB. And there was only one scope, which was fine since the space available…

Isn't abstraction merely an "indoctrinated" kind of convenience?

Surely you can, with a huge amount of inconvenience, achieve in Pascal what you routinely do in C++, by passing "self" into function calls and manually implementing vtable lookups? :)

(You might have a point with C++ templates but that's just saving yourself the trouble of a bunch of copy and pasta....)

Similarly, the "2GL" to "3GL" transition merely gives you the convenience of not having to maintain a call stack. There's no magic, you just save yourself trouble of writing boilerplate code with pushing and popping pointers and stack variables.

I would argue that the only reason it's considered a "paradigm shift" is merely because you were "indoctrinated" into thinking those advancements were so great that they were "more than" mere convenience. But, at least in retrospect, they are _trivial_ when compared with the advancements made in recent years (eg. Garbage Collection, Rust's safe memory management, import tensorflow, etc.). And while the old school programming language advancements surely boost programmer productivity and accuracy, I don't think it's fair to say they're more important than say the convenience of an "import fancypackage" that does 90% of the work for you.

Perhaps the form of improvement is often not in a new programming language (because perhaps classical languages are "good enough" for most cases), but I know I wouldn't enjoy programming with the tools available 20 years ago.

PS: I suspect your C++ perspective might also have tinted your perspective a bit. For the examples I gave as more recent advancements (i.e. GC, Rust, TF), they aren't (readily) available in C++. Sure you can say you prefer the speed of C++ which is entirely fair, but you might be pleasantly surprised if you looked outside.

Re: What was the last breakthrough in computer programming? (2019)

#202

Earlier quoted context omitted.

>Specifically, distributed version control and dependency management tools. Indeed, without these tools dependency hell wouldn't be possible! /s

Oh, we still had it!

Evidence - This started happening in the 1990s (latest) before tools like git and npm was a thing:

https://en.wikipedia.org/wiki/DLL_Hell

Re: What was the last breakthrough in computer programming? (2019)

#203
post #196

Earlier quoted context omitted.

> My point was that focusing on an empty string as the hill to die on was a touch artificial. There must be a term for this phenomenon. My original reply that sparked this thread could be tl;dr as "I get frustrated with most programming languages. People at work know me as the guy that always complains about programming languages. One example of that is that I recently complained about most languages making it hard t…

Type checking is not a panacea. You cannot use type checking to spot and fix all bugs. Funny enough the problem you raised was trivially solvable by creating a BNF-like checker based on the spec for "THEIR" API response data. YOU just didn't want to do it. I'm pretty sure there are solutions at least in C++ and Java (eg. validate at the edge and convert it into a ValidatedString type and use this type throughout), bu…

> Type checking is not a panacea. You cannot use type checking to spot and fix all bugs.

I didn't say it was or it could.

> Funny enough the problem you raised was trivially solvable by creating a BNF-like checker based on the spec for "THEIR" API response data. > > YOU just didn't want to do it.

I didn't write the code, but if I did, I WOULD have used a NonEmptyString type for the deserialized result of the response body. That's... pretty much my whole freaking point here.

The "problem" is that my colleagues, as well as many, many, devs, including the ones at the company in question, are going to do the easiest thing they can. If your language provides String, and writing your own NonEmptyString type would require a bunch of boilerplate, most devs are just not gonna do it. "We'll never have an empty string here, anyway" they'll say. Until they do.

And, as I pointed out in another comment, I DO write these types in languages like Java. It's a ton of boilerplate and the language fights you at every turn. In Java, most texty APIs expect a String instance, which is a final class. So I have to wrap String with my class and convert to-and-from explicitly all over my code. Not to mention the performance overhead and optimization loss from wrapping a primitive type.

So, thanks for the condescending attitude, but I DO put my money where my mouth is and I still feel completely justified in criticizing the current state of software development tools.

If our tools and "best practices" are adequate, then how in the hell did Apple, a trillion dollar company, just release a version of macOS a year ago that literally had a calculator app that gave the wrong arithmetic answer if you used it too quickly?!

Every time I criticize software dev stuff and someone replies and tells me everything is totally fine, it only makes me stronger.

Re: What was the last breakthrough in computer programming? (2019)

#204

I think that programming is the most confused discipline there is. I've mentioned this in previous posts. In any other field there is usually an established body of knowledge, either in science of professions like accountancy. In programming we're still arguing about whether the debits should go on the left and credits on the right, or vice versa. By that I mean, facetiously, we're still arguing about what programmin…

> Most new sciences - e.g. electronics - gather a mature body of knowledge relatively quickly. We know exactly how transistors work and how to use them, for example. Nobody argues about how to calculate the current flowing through a wire.

Ever since we made computers fast enough to implement basic things in the 1980/1990s, the debate has never been a "scientific" one. It's all about programmer preference and psychology.

Equations about electricity is relatively simple. Yet we don't have equations about programmer brains. The only way we can "scientifically" experiment with programming languages is to invent new languages/features and see how programmers react. Do they make fewer mistakes? Do they see increased productivity? Do they "like" it or even swear by it?

To a very large extent (more-so than most would imagine), trying to pin down "programming best practices" is like trying to set a standard for writing novels. You have common tropes and literary devices (aka "design patterns"), but the expressiveness of languages (both human and computer) makes it hard to make final, scientific conclusions.

The electricity on a wire thing is really much more simpler.

Re: What was the last breakthrough in computer programming? (2019)

#205
post #56

Earlier quoted context omitted.

Your comment kind of galvanizes my view that most of us suffer from Stockholm Syndrome with respect to our programming languages. As another commenter said, some statically typed languages give you unsigned numbers. Maybe most of them do. But definitely not some of the most popular ones. And out of the ones that do, they are often really unhelpful. C's unsigned numbers and implicit conversions are full of foot-guns.…

> ...shortcomings of Kotlin... I'd read that newsletter.

Don't get me wrong, I mostly like working Kotlin. But the more I do, the more I realize what a hodgepodge of features it really is. A bunch of features don't really work together that well. And a bunch of features are only 80% (or less) of what I actually want.

For example, what if I don't like data class's stupid copy() method? How do I opt out? You can't.

Value classes can't be used as varargs, can't implement an interface by delegating to the wrapped value. (Forgetting the fact that they're just buggy as all hell and I keep getting runtime crashes from them being overly aggressively optimized away)

And it, of course, inherits a ton of badness from Java. Like the crappy type-erased generics, lack of type classes, etc. It chose to just use Java's standard collection types and encourage copies instead of using persistent collections by default. It hides the mutability under "read only" interfaces, but that's not at all concurrency-safe. Map is not a Collection or an Iterable, which is dumb. Map's type parameters are also allowed to be nullable types, which means that Map.getOrElse{} is actually wrong in the standard library.

Since Kotlin chose nullable types instead of Option, you can't express "nested" emptiness. This means that the Map API is janky if you need to store nullable types. Map.get returns null if there was no value stored, but what if the value stored IS null? Then you have to call Map.contains(key), which means you have to hash the key twice to reliably pull out values.

There's just a lot of papercuts.

Re: What was the last breakthrough in computer programming? (2019)

#206
post #31

Earlier quoted context omitted.

Going back to the original comment, the statement was that any experienced engineer could learn a language in a day. At risk of gatekeeping, I'd argue that by definition any experienced engineer would have some experience with an array based language like APL or MATLAB so that no, J does not qualify as a different paradigm.

The implication of the original comment was that any C-style language engineer could learn any C-style language in a day. I'd even argue that point, but it definitely doesn't get you J in a day, except that an supports most C-style syntax. So you can program in J like a C-programmer in a day. You definitely can't program like a J-programmer. And to say a competent engineer would already have array-language experience…

Is Javascript a C-style language? Because even though the syntax looks superficially similar, REAL Javascript programmers apparently `npm install left-pad` instead of writing their own.

The C programmer in me feels abhorrent.

Re: What was the last breakthrough in computer programming? (2019)

#207
post #196

Earlier quoted context omitted.

Type checking is not a panacea. You cannot use type checking to spot and fix all bugs. Funny enough the problem you raised was trivially solvable by creating a BNF-like checker based on the spec for "THEIR" API response data. YOU just didn't want to do it. I'm pretty sure there are solutions at least in C++ and Java (eg. validate at the edge and convert it into a ValidatedString type and use this type throughout), bu…

> Type checking is not a panacea. You cannot use type checking to spot and fix all bugs. I didn't say it was or it could. > Funny enough the problem you raised was trivially solvable by creating a BNF-like checker based on the spec for "THEIR" API response data. > > YOU just didn't want to do it. I didn't write the code, but if I did, I WOULD have used a NonEmptyString type for the deserialized result of the response…

> I WOULD have used a NonEmptyString type for the deserialized result of the response body. That's... pretty much my whole freaking point here

Huh, you rambled about not being able to do so. But now you claim it's totally feasible if you wrote it?

It seems you're just ranting against bad programmers instead of missing language features then.

Re: What was the last breakthrough in computer programming? (2019)

#208
post #21

Earlier quoted context omitted.

>GC can be largely pauseless for many practical purposes and a GC language can be within 2x-3x the performance of C-like languages. To that end, it seems like only recently we've seen automatic reference counting [Obj-C, Rust, Swift] and/or compile-time garbage collection [Mercury] in a non-toy implementation. "Breakthrough" is a difficult word because it refers to discovery and impact, with the latter coming long af…

(Rust does not do automatic reference counting)

[deleted]

Re: What was the last breakthrough in computer programming? (2019)

#209
post #207

Earlier quoted context omitted.

> Type checking is not a panacea. You cannot use type checking to spot and fix all bugs. I didn't say it was or it could. > Funny enough the problem you raised was trivially solvable by creating a BNF-like checker based on the spec for "THEIR" API response data. > > YOU just didn't want to do it. I didn't write the code, but if I did, I WOULD have used a NonEmptyString type for the deserialized result of the response…

> I WOULD have used a NonEmptyString type for the deserialized result of the response body. That's... pretty much my whole freaking point here Huh, you rambled about not being able to do so. But now you claim it's totally feasible if you wrote it? It seems you're just ranting against bad programmers instead of missing language features then.

I believe you're being disingenuous.

I'm rambling because our programming languages make it awkward, difficult, and performance-sub-optimal to do such things.

If you do what I often do, you have to wrap and unwrap your primitives explicitly so that you can use APIs that others have written.

You take a performance hit with all of the boxing and unboxing.

It's absolutely still a missing language feature if the language doesn't have ergonomic "newtypes". Just because it's possible to write a ton of poorly performing boilerplate to accomplish my goal of type safety, doesn't mean that I think we're done. You can do these things with essential zero runtime overhead and almost no boilerplate and friction in the code. It's entirely possible to do newtypes and refinement types in Rust, Haskell, D, Scala, even TypeScript. It's just that most of those languages are not very popular. TypeScript is the most mainstream of the lot.

I think "good programmers" are more of the problem than bad programmers. Good programmers are so used to these shit languages and all of their workarounds (excuse me: "design patterns") that they can't even see the forest for the trees and realize how tedious and stupid most of our work actually is. There's no Earthly reason it should take a million lines of code to write a CRUD app (I'm counting dependencies).

Re: What was the last breakthrough in computer programming? (2019)

#210
post #83

Earlier quoted context omitted.

It sounds like you and Alan Kay are both expecting novel problems to be solved by new programming languages. That is an extremely inefficient way to do it: you need to come up with new compilers, documentation, standard libraries, communities, etc. Instead, programming languages have become general enough that most new problems are being solved within existing languages, instead of by inventing new ones. I have no id…

That's not quite it. Let me explain... The first computer language I used was BASIC. It was excellent for what it was, but clearly it had a limit on how much you could do with it, on account of it missing amenities like named functions, variable scopes, etc. A 'function' was simply a line further down the program that you branched to using GOSUB. And there was only one scope, which was fine since the space available…

What I've observed is that programming languages have significantly caught up with the math behind them. And it's not uncommon for some of the nearly-cutting-edge math to be hundreds of years old, or more. I recently looked into algorithms for finding the GCD of two numbers, and Euclid's algorithm from 300 BC is still basically the best way to do it (with an optimization for our binary representation happening in 1967). As programming languages catch up to the underlying mathematical theory, they're going to start progressing at the pace of math breakthroughs. That kinda sounds like a good thing to me.

I don't see object-oriented languages as the pinnacle. Notably missing from your list are functional languages, which I also don't see as the pinnacle, but rather "beside" OO langs. A 5GL to me is one that incorporates the best of each paradigm. I generally program in C# and TypeScript, and I'm constantly switching between an imperative style, an OO style, and a functional style. C# is almost my ideal language; its type system is just a little too weak. Perhaps it's a 4.5G language. But let's look at what you can do with it:

* Strong OO support

* First-class functions (functions-as-data)

* Strong support for reflection, allowing powerful IoC and types-as-data

* Good generic type support (reified! Yay!)

* Generators with yield

* Async/await flow programming, including "yield async" mixing the two

* Low-level bit manipulation, arrays of structs (certain memory guarantees), unchecked operations when you need them, and other C-style concepts

* LISP-style macro manipulation (code-as-data) using Expressions (under-appreciated IMO)

* No higher-kinded types :(

* LINQ, if you're into it ... but I prefer fluent because it's more extensible and language-idiomatic (although you can write your own limited LINQ-style methods)

Add in higher-kinded types and how could you not call that a 5GL? I honestly don't know what else you could possibly want from a programming language, except maybe Rust's borrow checking (which frankly is a recent breakthrough in computer programming, kinda challenging the premise of this whole thing).

My next big idea is a programming language whose type system is written with the "same sauce" as the language itself. So the output of a "program" could be the type system for another program. You could write your software in "tiers" of progressively more strict/knowledgeable type systems. That's one thing I haven't seen before that sounds neat, but who knows if it's actually useful.

Post reply on HN