News for hackers. Stuff that matters.
Re:GTK 3.99 by rleigh on Friday July 31, 2020 @07:39PM (#24015671)
There are so many that I could spend several hours ranting about them.

If you invested time and effort in writing GTK+ 2.x applications, the GTK+ developers spent zero time caring about API compatibility even for cases where it would have cost them nothing to maintain. They just had to rip it all out just for the sake of it, even when single line compatibility forwarding functions would have been entirely sufficient to avoid breakage.

This is the fundamental dichotomy with GTK+. Its developers want to hack on the toolkit itself for their own amusement and occasionally for GNOME features. They don't care about the needs of the application developers who would use their toolkit to write actual applications. God forbid it's used for its intended purpose. If you invested thousands of hours into using it, they will not bear that in mind as they rip out stuff people used for over two bloody decades in the name of "progress". Like GtkHBox. Gone. There since 1997 and used by every GTK+ application on the planet, but that's no reason to keep "old code"!

That's their choice. But other libraries like Qt do take better care of the interests of their customers and end users, and don't gratuitously break core functionality on a whim while chasing shiny new things. In the above example, the GtkHBox class is replaced by GtkBox with an "orientation" property.

Now, any sane developer would retain GtkHBox and simply implement it in terms of GtkBox with a defaulted "orientation" to horizontal. New way works. Old way works. No breakage. Everyone is happy. But they just had to rip it all out in the name of "progress". Consider how many instances of this there are in a large codebase. Hundreds to thousands in a big UI. The breakage was entirely avoidable and quite unnecessary. Maintaining the compatibility code would have been a tiny effort with a few one-liner compat functions, but ripping it out imposed huge problems upon every user of the library. "Cleanliness" needs to be traded off against "breaking end users", but they have the scale dialled all the way to one side, which is spectacularly unhelpful and inconsiderate.

That's just one class and one example. You could write a book enumerating all of the other instances. It's that bad.

No one who looks at this rationally in 2020 should be choosing GTK+ for a new project. You know in advance it will end in tears and frustration, as all of the value you created will be destroyed on a whim by developers who should know better, but go ahead and break everything anyway just because they can. That's their choice. But it's our choice to not get sucked into the bizarre world where this kind of software maintenance is considered in any way acceptable or justifiable. Seriously. These people are on another planet. What project intentionally gives the finger to all of their developer base? A really messed up one with nonsensical priorities.

Sorry if this comes over badly. If you can't tell, I've got a bit of pent-up frustration after spending far too many hours of my life trying to work around GTK+, submit patches which are ignored, and try to develop applications in spite of GTK+, not because of it. I should have just used Qt from the start.

Re:GTK 3.99 by cycloptic on Friday July 31, 2020 @07:58PM (#24015840)
>retain GtkHBox and simply implement it in terms of GtkBox with a defaulted "orientation" to horizontal.

I'm sorry, I understand your frustration but to me this is a terrible example and kind of makes the rest of your post look like complaining about a non-issue. This is exactly how it's already implemented in GTK 3. GtkHBox was deprecated there and slated for eventual removal, then it got removed in GTK 4 because the whole point of it is an API break and removal of deprecated functions. If this bothers you, you can keep using GTK 3 which is now considered feature-complete. The situation with GTK 2 was the same, you could keep on using it if you didn't want to bother updating your application.

Re:GTK 3.99 by rleigh on Friday July 31, 2020 @08:05PM (#24015901)
Wow, that response demonstrates exactly what is wrong with this library and its developers.

"You can carry on using the old version" is a real cop-out which does not address the substance of the complaint in any way whatsoever.

Yes, I know it's being removed in GTK+4. You didn't have to remove it. You chose to. And to hell with the consequences. You could have kept it pretty much indefinitely with near zero maintenance overhead if you cared about compatibility and the extent to which that core functionality was used.

I am always surprised at how much time gets wasted on trivia, and yet a simple maintenance issue like this is too difficult despite requiring much less effort.

Re:GTK 3.99 by chris_wot on Friday July 31, 2020 @09:40PM (#24016546)
Deprecated means “if you use this, on your own heads be it”.
Re:GTK 3.99 by rleigh on Saturday August 01, 2020 @05:22AM (#24019027)
Deprecation does not imply removal in the short-term. Java has deprecated many things which will never be removed, because they care about compatibility. Just because there's a newer way to do something does not mean the old way must be removed as soon as possible. If it was very high maintenance and it prevented the addition of new functionality, this might be justified. But that's not the case. It's completely gratuitous.

The GTK+ removals are akin to removing "strlen()" from the C library because a better "strlengh()" was added in the meantime. Compatibility matters. And well-maintained projects balance that with the addition of new features.

Re:GTK 3.99 by chris_wot on Saturday August 01, 2020 @10:11AM (#24020543)
Perhaps there should be a raft of functions in the C library that are deprecated and removed.
Re:GTK 3.99 by rleigh on Saturday August 01, 2020 @04:21PM (#24023580)
Deprecated, perhaps, should suitable replacements be standardised. Removed, absolutely not.

It cannot be overstated just how terrible compatibility breaks are. C is nearly 50 years old, and all of its standard functions are thoroughly entrenched, despite their numerous known defects. It took long enough to eliminate gets(), and that was broken from inception.

In almost all cases, removal is not the best solution. Supplementing with a safer or better alternative to supersede the original, by all means. But deliberate breakage causes nothing but pain all around.

In the case of GTK+, it's nearly 25 years old. These is a legacy of thousands of applications, large and small, which have invested hundreds of thousands of developer-hours in it. Obsoleting things might save the GTK+ developers a little extra effort (though I doubt this), but it imposes several orders of magnitude more work upon the worldwise developer base tied to GTK+, which could be avoided entirely without holding back progress.

Re:GTK 3.99 by chris_wot on Saturday August 01, 2020 @10:57PM (#24025958)
So you expect the developers to keep maintaining old interfaces forever? The C library, that I understand (POSIX and all), but GTK+? I think that's an unnecessary burden.

Now if someone wanted to make a shim library that had the old APIs, that might be doable.

Re:GTK 3.99 by rleigh on Sunday August 02, 2020 @05:00AM (#24027398)
It all comes down to impact.

Removing an unused and long-deprecated interface is low impact. Removing a widely-used interface is very high impact.

When you have an interface that is nearly 25 years old and a staple part of every GTK+ application in existence... that's a very high impact change. I'm unsure how the GTK+ developers rationalised that one. But I am completely certain they made the wrong call there. It's too disruptive. I don't think it should have ever been dropped, or considered for dropping. Deprecated, yes. But not dropped.

I'm coming from the perspective of an end-user of GTK+: an application developer. Though I have historically also contributed bits upstream. I moved away from using GTK+ several years back at this point, precisely because the upstream maintenance practices were too much of an ongoing imposition, along with all the other criticisms one can make of it. GTK+ might be "free", but the cost of using it is very, very high.

Re:GTK 3.99 by cycloptic on Sunday August 02, 2020 @10:58AM (#24029093)
There are 800 deprecated symbols in GTK 3. They were removed in GTK 4 because nobody upstream is willing to pay the cost to maintain them anymore. There is a real cost and typically this cost is that you have to commit to bugfixes and refactoring on the deprecated bits for the entire lifecycle of the new version, which is potentially many years. If the app developers aren't willing to pay the cost either, then you've got a hung jury situation.
Re:GTK 3.99 by cycloptic on Friday July 31, 2020 @08:22PM (#24016018)
I'm not a GTK developer so please spare me the shooting of the messenger. All I did was read their documentation. From what I've seen there are very few paid developers actually working on GTK. Everyone else is volunteers and none of them are interested in maintaining deprecated APIs for any protracted amount of time. Even with the removal of a lot of deprecated functions in GTK 4, there is still a ton of untested code sitting around that nobody really maintains. You're welcome to write tests for these and maintain an external compatibility layer yourself if you want, but it makes no sense to expect other volunteer developers to do this for you when the old versions are considered stable.
Re:GTK 3.99 by rleigh on Saturday August 01, 2020 @04:10AM (#24018692)
> "Everyone else is volunteers and none of them are interested in maintaining deprecated APIs"

This is a complete cop-out. It's maintained by several RedHat employees as part of their duties, and a handful of volunteers.

Every software project on the planet, including commercial ones, is maintained with limited resources. The amount of development and maintenance which is possible is constrained by the available developer hours, and work is budgeted based on that.

The cost/benefit of maintaining the compatibility code is so low that it's not even worth the effort to remove it. The time taken to drop it was likely on a par with the time to retain it. It was already written. But the cost imposed on all their userbase after removing it is absolutely huge. And it means that an application can't target old and new versions due to the break. That wreaks havoc with support lifetimes and imposes thousands of developer-hours of effort for porting. Lots of effort... just to get back to where you were. Unjustifiable.

I could understand if there was a huge benefit to be gained. But there isn't. And when you look at what they do spend their time on, so much is wasted on other activities that justifying its removal based upon developer resources wears a little thin. It's a weak justification which ultimately boils down to just wanting to, and completely ignoring the actual users of the library.

Re:GTK 3.99 by cycloptic on Saturday August 01, 2020 @08:03AM (#24019825)
If the cost/benefit is so low then you do it. I'm completely 100% serious about this, I assume you have some customers lined up who are willing to pay for this so just take the money and don't worry about what anyone else does. Make it as an external library so you don't have to spend time convincing upstream to merge and maintain it. None of the existing volunteers are willing to do this work, and the paid developers get paid to work on what Red Hat customers pay them to work on, which evidently is not related to maintaining legacy applications at all. If they want to leave money on the table, that's their problem. There is nothing wrong about what you're saying but it's mostly hot air, you're preaching to the choir here.