3,875 karma · joined March 26, 2009
In science-related code, I can image a case for calculating things like seconds elapsed across a very long time period. But in that case you're not really dealing with dates. Instead, you want something like the Unix epoch, but probably with an earlier epoch start.
There may be some very niche cases for pre-1582 dates in code that I'm not thinking of. But I'd expect that in this case you're going to put a lot of effort into finding the right libraries, or you might just write your own code.
Regardless, the linked blog post says of DateTime: "Unfortunately, like Python, a proper error message for impossible Gregorian dates is notably absent."
But this is just wrong. There's no "proper error message" to emit. The code works as documented.
> DateTime is a class for the representation of date/time combinations, and is part of the Perl DateTime project.
> It represents the Gregorian calendar, extended backwards in time before its creation (in 1582). This is sometimes known as the "proleptic Gregorian calendar". In this calendar, the first day of the calendar (the epoch), is the first day of year 1, which corresponds to the date which was (incorrectly) believed to be the birth of Jesus Christ
Always RTFM.
Edit: I double-checked, and while this was not in the docs in the first release, it _was_ in the docs as of 2015.
With Murderbot, the "corpos control everything" scifi future setting is nothing new. I think the brilliance is in its portrayal of the main character, primarily through its inner voice. Murderbot is a really unique character and it is written very well.
Conversely, in Piranesi, the main character is basically a cipher. He doesn't know who is, and we don't learn a lot about him or his psychology for most of the book. I felt like he was mostly there to let us experience the world, which as you put it was otherworldly and quite unique. The brilliance of the book is the prose and the world, not the character.
But like I said, I think comparing anything to Dune is pretty tough. Dune is a landmark work that still influences modern writers, and that modern audiences still enjoy reading. The recent movies have translated it to the big screen and captured an even larger audience (an amazing feat given how weird the books are).
Very, very few SFF books have had a similar impact. There's Tolkien, who is arguably the most influential SFF writer of all time. What other SFF works from the 60s or earlier are still as widely read and influential as Dune and LotR? Almost none, except Le Guin's Earthsea books, which barely squeaks in with a 1969 release for the first book.
I really like that the Hugos added a Best Series category in 2017 to hopefully avoid this sort of thing. It seems like a great series is a different beast than a great single novel.
* 2020 - A Memory Called Empire by Arkady Martine - a science fiction story set in a future Aztec space empire - quite inventive and odd. The sequel won in 2022.
* 2024 - Some Desperate Glory by Emily Tesh - basically a story about growing up as a terrorist in a sci-fi setting, with some wild turns.
* 2025 - The Tainted Cup by Robert Bennett Jackson - a very bizarre Holmes & Watson take set in a land constantly invaded by sea kaiju, and where there's "magic" (or is it science) based on harvesting the dead kaiju's bodies.
These are all excellent books, each of which has something different to recommend them.
Are they as good as Dune? Well, it's very hard to say _now_. Assuming humans still exist in 60 years, will they still read them like we read Dune 60 years from its publication? Maybe.
Heinlein's Stranger in a Strange Land won in 1961. I've read it, and I don't think it's aged very well. It's certainly not Dune.
How many people are still reading the 1969 winner, John Brunner's Stand on Zanzibar? I _have_ read it. It's good, but nowhere close to Dune. And how about 1978's winner, Gateway by Frederik Pohl? It's ... fine. It's not even in the same category as Dune, IMO.
Dune is an outlier among _all_ winners. It's one of the best SF books of all time, with a voice that still seems fresh today. Most Hugo (and Nebula) just don't live up to this standard. There are a few that do, like Left Hand of Darkness, Ender's Game, Hyperion, and Jonathan Strange & Mr Norrell (better than Dune, IMO). But those are outliers just like Dune.
This is exactly how Rust works, except there it's built into the compiler, and there's no such as nil in most code.
I don't remember there being anything about growing replacement clones, but it would make sense given the other tech in the story.
And you respond by saying that you can, but you need to do a _lot_ of work with him to spec this billing system out. You can't just build "a new billing system" without any more details. You tell him that this will take many hours of work between the two of you where you ask him questions, write a spec, get his feedback, and repeat that a number of times.
At this point, he says "wow, that sounds like a ton of of work for me just get started", and he gives up.
AI does not fix any of this, and this is the thing that I think most people will not want to do, and that's why I think this blog post is making a very good point. The amount of work it takes to build a new software system, even with a super competent programmer as a partner, is still quite significant. And it requires thinking about hundreds of tiny little details in a way that drives a lot of people nuts. They will only do it if they _really_ have to do it.
My personal favorite is probably Family Mart, because they have multiple very delicious vegan rice balls to choose from.
PHP? I don't know how widely it's still used, but I'd guess it's more widely used than Perl. Also, PHP is not "as bad" as Perl. It's much, much, much worse. It's Perl without the charm.
This lack of flexibility means that it's impossible to experiment with replacements for built-ins, and the lack of generics out of the gate meant so many things were simply impossible (like useful iterators).
Compare this to Rust, where almost everything like this is just a trait. If you want to offer a map replacement, you just implement the Index and IndexMut traits.
Overall, I don't think Perl is the best language design. It has some interesting ideas. Go is _also_ not the best language design. Is Rust the _best_? No, but it's better than both Perl and Go, IMO.
I assume you disagree with the blog post, not with my comment, since this is exactly what my comment says too!
1. It pulled away folks who would otherwise have spent time improving Perl 5 (either the core or via modules).
2. It discouraged significant changes to the Perl 5 language, since many people figured that it wasn't worth it with Perl 6 just around the corner.
3. It confused CTO/VP Eng types, some of whom thought that they shouldn't invest in Perl 5, since Perl 6 was coming soon. I've heard multiple people in the Perl community discuss hearing this directly from execs.
Of course, hindsight is 20/20 and all that.
Also, even if Perl 6 had never happened the way it did and instead we'd just had smaller evolutions of the language in major versions, I think usage would still have shrunk over time.
A lot of people just dislike Perl's weird syntax and behavior. Many of those people were in a position to teach undergrads, and they chose to use Python and Java.
And other languages have improved a lot or been created in the past 20+ years. Java has gotten way better, as has Python. JavaScript went from "terribly browser-only language" to "much less terrible run anywhere language" with a huge ecosystem. And Go came along and provided an aggressively mediocre but very usable strongly typed language with super-fast builds and easy deploys.
Edit: Also PHP was a huge factor in displacing Perl for the quick and dirty web app on hosted services. It was super easy to deploy and ran way faster than Perl without mod_perl. Using mod_perl generally wasn't possible on shared hosting, which was very common back in the days before everyone got their own VM.
All of those things would still have eaten some of Perl's lunch.