Tag Info

Hot answers tagged

57

You're underestimating the impact of backwards compatibility; your estimate that all active projects would migrate in 3 or 4 years is far too optimistic. Suppose I'm a PHP developer. PHP has flaws, but I know how to work around those flaws - that's part of the reason I get paid as a PHP developer. Now suppose that PHP 8 comes out and fixes those flaws, ...


33

I'd get rid of the Non-generic collections. They are an abomination...and there are too many cases where I'm using linq and have to do something like var customObjects = container.CustomObjects.Cast<CustomObject>(); Every time I have to do that, a small part of my soul dies.


31

Anonymous methods. I think everyone agrees that the anonymous method syntax chosen for C# 2.0 is chunky and clunky compared to the lambda syntax we added to C# 3.0. It is deeply unfortunate to have two almost-identical syntaxes to do the same thing.


24

void as a type. Why on earth is "void" a type? It has no instances, it has no values, you can't use it as a generic type argument, formal parameter type, local type, field type or property type. It has no meaning as a type; rather, it is a fact about what effect a method call has on the stack of the virtual machine. But the virtual machine is just that: a ...


19

Unsafe covariance on arrays of reference type. With typesafe covariance on IEnumerable<T>, at least some of the need for array covariance has gone away. (If we had a covariant read-only list interface then we wouldn't need it at all.)


19

The empty statement ;. Error-prone, almost always a typo, and gives you no added meaning that is not already expressed by {}.


19

It sounds fine, but rarely works out in practice; people are extremely reluctant to change running code, and even for new, green-field projects they are very reluctant to switch way from a language/version that they already know. Changing existing, running code that "works fine" is not something that ranks high on any project's priority list. Rather than ...


15

You should upgrade with each release of jQuery -- just take a peek at the update logs before updating. The jQuery team is very good about documenting API changes, and -- even when the API does change -- it's not uncommon for them to support deprecated calls. At this point, the vast majority of the API is quite stable and probably won't change. Most changes ...


15

You're making a lot of assumptions about human behavior. If you change it too much, people will evaluate your competitors, since they're going to have to spend significant effort switching anyway. For open source languages, people will just fork the old version. Look at python for an example. 3.x has been available for four years, and still isn't widely ...


14

Update your version of jQuery if and only if you need some new feature that's included in the new version. Simple as that. If you frequently develop using jQuery, keep an eye on the official blog to know when updates are released and what they offer. Wait a couple of weeks or so before upgrading to the latest version to make sure any unexpected bugs get ...


13

The unary plus operator. Least useful operator of all time. If we didn't have to keep it for backwards compat, I'd take it out in a heartbeat. Who uses this thing, anyone? (Clarification: The unary plus operator +x is not the preincrement operator ++x, not the postincrement operator x++ and not the binary addition operator x+y.)


12

To quote MSDN: The .NET Framework 4 is backward-compatible with applications that were built with the .NET Framework versions 1.1, 2.0, 3.0, and 3.5. In other words, applications and components built with previous versions of the .NET Framework will work on the .NET Framework 4. However, in practice, this compatibility can be broken by ...


10

Defaulting numeric literals to double For most business apps, decimal is more appropriate anyway... or maybe it would be better to just remove the idea of a default, and force developer to actually make the choice. (That "remove the default" would be appropriate for some other things, too. For example, I've given up trying to persuade everyone that classes ...


8

For any language other than PHP I'd say, yeah, that absolutely makes sense! That's exactly what Python is doing with the switch to Python 3. However, the problem with PHP is that there are too many flaws with the language design itself, thus what you're calling "PHP 8" would be a completely different language. And if you'd have to switch to different ...


7

C++0x now is named C++11. Since C++ never was compatible with C, i doubt that C++11 will be. As for compatibility with C++ 98, have a look at the ISO standard for C++11.


7

This is more a guideline than a feature, but I think it's important because it's already too much ingrained in people's minds as the canonical and best solution: The official pattern to implement IDisposable. It's cumbersome and there're better ways.


6

If I understand you right, you'd be implementing the adapter pattern to isolate the API calls from the rest of your application. So when the time came to switch from v1.0 to v1.1, you'd just modify your API wrapper implementation to make different calls and the rest of your application wouldn't know or care. So your application structure would look ...


6

If you are going to switch anyway, you should really consider going with PDO instead of MySQLi. The main benefit, would be that your application would be able to work with any of the 11 other database backends supported by PDO, with minimal fuss. This might not be a priority for you, but since this is an open source application there's little reason to ...


6

Language stability is not a technical decision. It is a contract between the language author and the users. The author advertise a given version as more or less stable. The less stable a language is, the more changes the author can make. Each user interested by the language can decide if he wants to invest time in it to learn new features or develop ...


5

Insofar as the ancient question "what browsers should I support" the only good answer is "look at your traffic stats; combine with understanding of expense of what to support and make a rational decision." Anything else is ineffective. My take on the recent Microsoft action is it is more fluff and PR than anything real. The folks who are still on IE6 are ...


5

Upgrade as soon as you can without breaking anything. New functionalities, bug fix, new features are introduced in every iterations. You might not need the latest features but when you do, you'll need to validate every new version in between what you have to make sure it doesn't break anything. Small increment will allow you to keep everything up to date ...


5

You're doing it right. You're stamping data with its version, which means you have a definite interpretation of it. The only open question is how to handle "old" data. Your choices are essentially between upgrading data where it lives, having your code adapt the data in realtime, or having the code handle multiple data versions. From 30+ years ...


5

This is rather subjective, I think. Most people would say that PHP has been reasonably backwards-compatible. In that a script written for version 4 would mostly function on version 5. There are various settings and warnings you can enable which will notify you about potential problems (e.g. E_STRICT and E_DEPRECATED warning levels). However, there's ...


5

Disclaimer: I manage a ColdFusion user group. ColdFusion suffers the same problems: loved by many, despised by many. In addition, tons and tons of FUD based on pre-Java versions. ColdFusion 10 came out last year, is a huge seller and last week I signed up to test the pre-release of version 11. Also, there are two major open source alternatives, one is ...


5

Be aware that languages change throughout their life, regardless of how well it might be designed up front. Instead of trying to immediately ship the most awesome language on earth, first try to be useful and extensible. A mediocre langauge which I can actually use is worth more than any wonderful programming language that only exists in theory. Consider ...


4

Methods and types of Array and List<T> that became obsolete with Linq, for example: Array.TrueForAll can be replaced with Enumerable.All Array.FindAll can be replaced with Enumerable.Where List<T>.ConvertAll can be replaced with Enumerable.Select Predicate<T> can be replaced with Func<T, bool> Converter<T,R> can be replaced ...


4

If you look at this article, you can see the percentage of iOS users running each of these OS versions as of one month after iOS 6 was released. It's probably a safe guess that the percentageof users running the latest version has increased some since then, though users who were still using iOS 4 two months ago are unlikely to have upgraded since then, ...


4

There's a tradeoff here; some bugs REALLY need fixing, but some things can't be changed without breaking someone's code somewhere. I seem to remember someone stating as a "rule" that every bugfix will break someone's project, no matter how obscure or obviously-broken the bug is, someone will be using it for something. Such is the nature of programmers. This ...


4

An explicit check of the callback's ability to handle parameters is about the best you're going to be able to do. Python may be loosie-goosie in its duck typing, but it will complain and raise a TypeError exception if you feed a function the wrong number of parameters. No ifs, ands, or buts about that. You have existing functions in the field that you don't ...


3

that is a decent system besided the code bloat for upgrading data my advise is to upgrade as much as possible while remaining lazy about it (you read a object from a previous version->you overwrite it with the same (now upgraded) object from the current version) but you will run into trouble if you ever tighten up the data invariants or simply do a ...



Only top voted, non community-wiki answers of a minimum length are eligible