Tag Info

Hot answers tagged


For the same reason you don't use a Swiss army knife to carve a chicken... The Swiss Army knife generally has a blade, as well as various tools, such as screwdrivers and can openers and many others. These attachments are stowed inside the handle of the knife through a pivot point mechanism... The design of the knife and its flexibility have ...


Because nobody wants to rewrite all the legacy code. It's difficult to agree on all the purposes Once you put together a comprehensive list of purposes, they would change before you could get it built. Somebody would start a completely different language due to a new purpose. Microsoft Apple Open Source What would we do with all the Babel Fish? Couldn't ...


Register Globals in PHP Information : http://php.net/manual/en/security.globals.php This is by far the worst feature to be ever implemented for readability reasons and security reasons. Basicly all the GET parameter received are transformed into variables. For example with this URL : /index.php?value=foobar You can do the following : <?php echo ...


What you have in programming is a very large problem domain. This domain ranges extremely and in many directions. This is why embedded flight controllers are written in C and websites are written in PHP, Java, Rails, .NET and a host of others. For the embedded flight controller I have about 128k of memory to work with and on top of that if my code gets an ...


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.


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.


Start showing a message "this feature is scheduled to be removed on $date, please get in touch with us if you feel this would inconvenience you" whenever a user makes use of one of these obscure features. If noone gets in touch for X weeks, pull the plug. Letting users know in advance (and specifying a deadline) is a good practice in its own right, ...


Features are what sales people sell. Functions are what programmers develop.


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 ...


Go to your garage (or your parents' garage). Open the tool box. If you see more than one tool, think about how that applies to your question. If you have no toolbox, or only have one of those little hammers with the screwdriver bits in the hollow handle, then I have great sympathy for you. Seriously. If you go to an auto shop, does your mechanic have ...


Allow Null by default, the "trillion"* dollar mistake. Sorry Tony Hoare. Almost every language available on planet. Tony Hoare explains *I adjusted the expression coined by Tony Hoare to reflect actual loss on these days :-)


Practically anything in Haskell Monads. Yes - the big scary word that makes increadibly easy parsers, IO, operations on Lists and other things so easy (once you notice common pattern) Arrows. The same for advanced users ;) Standard stuff like lambdas etc. Currying functions Algebraic data types Pattern matching And many more. PS. Yes. I am Haskell ...


Lisp macros. The Lisp macro language is Lisp, with a few predefined syntax features for the sake of convenience. Using them, it is possible to add major features to the language, such as one's choice of object orientation styles or Prolog-like deterministic matching, without looking out of place. It makes the setf macro possible, which is a conceptually ...


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.)


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


C and C++ MACROS. If I ever have to see another compiler error due to someone choosing a standard function name for their macro which screws up my code I'm going to scream. Let's see the last offending one: #define vector(int) new VARIANT[int]; Aaarg! What have you done with my STL vector!?


Python's decorator. It's extremely easy to implement memoization or timing of function using the decorator. Example of a function timer. class FuncTimer(object): """ Time how much time a function takes """ def __init__(self, fn): self.fn = fn self.memo = {} self.start_time = time.time() def __call__(self, *args): ...


Casting to void* in C. You can cast everything to raw bytes, and do whatever you want with these data. (Yes, nowadays it's unique...)


Fallthrough by default in C and C++ switch statements.


There are three main ways I am aware of to solve this problem. On website use user tracking e.g. CrazyEgg In apps or web connected programs use phone home features. When 1 and 2 are not possible, e.g. non browser client programs, sensitive data, behind firewalls or when you decide not to use 1 or 2 then you need to talk to your users. I'm not talking about ...


A compiler and a useful shell. Clarification based on the comments: I was unclear, I should have written C/C++ compiler. Compilers for C# or Fortran doesn't count, as much of the tools and libraries you need requires a C or C++ compiler. It used to be really bad, where you could not build C extensions for Python with another compiler than Microsofts, ...


Implicit type conversions when the types being converted between have no obvious relationship. For example, converting a random, non-numerical string into an int, like in PHP.


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.)


Yield in Python In Python (and I believe in C#), you can define a so-called generator that pauses function execution at a yield statement, returns the value and on subsequent calls, restarts the function where it left off (with the state preserved between calls). This is great for generating long lists of values where you are only interested in the current ...


goto: although ok in rare cases, it is more often misused and leads to hard to read programs.


I think you're doing the right thing. You can't please everybody, and you shouldn't! Be polite and professional, but you don't have to do everything you're asked.


NONE Just because a feature gets misused frequently does not make it harmful. IMHO the entire "is considered harmful" is the Reductio ad Hitlerum of programming language discussions. Most, if not all, of the "harmful" features have, or had originally, a very valid use case or are simply convenience methods in the first place. It is up to the developers ...


A different kind of answer to the others - I actually think there is potential for a language to become a "universal" one, allowing the features and paradigms of many other languages, though not perhaps a strictly designed language you might be thinking of. To use brettmjohnson's analogy above, the idea that each programming language is the tool inside a ...


if resharper has it visual studio should.


The ability to write and run programs in various languages (C, C++, Python, Perl, Ruby ...) without having to install anything extra. Having at least one text editor with syntax highlighting installed by default. A package manager so that you can easily install extra libraries, version control systems, IDEs etc. A powerful command line interface. The ...

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