* It has everything including the kitchen sink but nothing in the decor matches. There is no unifying principle to help you grok the language
* The Community is all about quick hacky fixes to already broken code and this approach seems to flow from the core developers out.
* It's not type safe, not even at runtime. I don't know if I ever want to work in a language that doesn't have proper type safety as a guard rail. (Note I'm not talking about compile time vs runtime type safety I'm just talking about type safety period)
* The code is just plain ugly to look at and I used to be a pretty heavy perl coder so that's saying something.
I know some of these are pretty subjective but for me php just manages to hit every single one of my top programming language gripes.
If you want to know my favourite that's a much harder question to answer. Golang has been pleasing me lately although it's interfaces have a very tiny hole in the type safety.
ML and it's varying descendants have as close to my ideal type system as I've ever seen. But the chances I'll ever get to use it for a job are slim to none and it seems the community is a little too academic for my taste.
Lisp has the most awesome metaprogramming built in and I had a brief heady love affair with it until it's lack of good type safety brought me back to earth.
I suppose all this means I'm one day fated to write my own "ideal" programming language so it can be featured in a list like this :-)
For example, this specific problem is harder to create in stronger-typed languages, since you would need to explicitly cast from an integer to a string.
If the language treats a string as a number in some cases without an error then that is most definitely not type safe.
Just because php is at one extreme end of the spectrum of my preferences for type safety doesn't mean that other things can't be closer but not quite on my end of the spectrum yet.
Static type safety is desirable, dynamic type safety is almost essential. But they are both type safety.
I'm not that interested in programming, so I think it's a great language. All those years back when first learning to use it, I remember going through a book and being so happy that it did practically everything itself.
For example, you can use include ( ) in so many ways, autoload classes, write getters/setters and override anything, implement views, etc. Everything "just runs", or can be compiled into fast code with HipHop (or cached with APC).
OK, to be fair, I would say that PHP with a framework that takes advantage of it can be very cool. I can't exactly share our codebase, but you can see the open source version from 2 years ago : http://phponpie.com to aprpeciate some of the "beauty" of PHP
And it can be extremely expressive and powerful. Sure, it can't do everything that Node.js can do, but for serving requests it can be awesome. It isolates every script in its own memory space, so you never have to worry about anything! The one thing I do not like about PHP is that it's married to the outdated thread-based webserver model, while the new boys on the block (NGinX, Node.js and the new Apache) all use event-based programming.
Don't downvote just because I said PHP can be cool. Look at our framework at least, before voting :)
"This language really sucks." -- paraphrased, intro to PHP on Facebook's internal Wiki
It's true that most software makes me either angry or sad, but PHP (where even "==" is wrong after Perl had gotten it right) was a singularly memorable peek into Special Hell.
I think they have to use that subset so it can be compiled by HipHop down to C code.
On the other hand, all of my programming horror stories and terrible hacks have been written in PHP. I remember having to use an older version of PHP that failed to support closures when it was needed in some legacy code. The code was passing functions as arguments, but because the functions were not bound in the local scope, there were issues with namespace collisions. I had to resort to global variables for a situation that should not have needed it because rewriting everything properly required a non-trivial refactoring that I did not have the time to complete. Granted, this has been addressed in more recent versions of PHP, but there are always old versions floating around where "gotcha's" like this show up.
More recently, I ran into an issue porting PHP 5 code across different linux distributions where, for some strange reason, libraries on the include path failed to be found. Debugging something like that is ridiculously frustrating. Problems like this are bound to show up with any technology you use frequently, but my work involves using many languages and technologies and, of them, PHP is the only one that leads to these sorts of problems with such regularity.
That sort of a market generally gets swarmed by low price developers very quickly.
I think this sums up everyone I've met who actually likes PHP. They like that they are able to get stuff done, and look no further. It is just frustrating to those of us who know that PHP is one of the most poorly designed (and I use that word loosely) languages ever to be successful.
If you can get over the local maximum of getting stuff done in PHP, the grass actually IS greener in Python and Ruby land.
And, actually, it's NOT necessarily a bad thing to have a language oriented around people who don't actually care that much about programming when it's also oriented around people who want to ship something useful to an end user (who might care if it's insecure but doesn't care if the code's pretty).
I've encountered a number of orgs now that have PHP on the front speaking XMLRPC or JSONRPC or whatever to a backend daemon (either Java or Perl in the cases I've seen) and since that means messiness on the front end shouldn't be able to violate business rules, it works out really well.
In the past, of course, PHP did have magic_quotes, which was a misguided attempt at mitigating SQL injections. This has since been removed, and there's been a big push in the direction of using prepared statements/parameterized queries through a library like PDO, which I think was introduced in PHP 5.
So was the (I believe now deprecated) mysql library they shipped and the tempting ease of string interpolation.
I see PHP as a language comparable to English. Both languages have a bunch of inconsistencies, peculiar idiosyncrasies, a humongous base of speakers/users, etc. In both languages, a lot of what people write is not of high quality, but writing high-quality stuff is certainly possible. If I had to choose one language for the world to speak, it probably wouldn't be English, and if I had to choose one programming language to be used in a given field (say, server-side web development), it probably wouldn't be PHP. But given the reality of the situation, PHP, like English, is an incredibly useful language, and PHP code, like English writing, can be of very high quality. I think this makes it a very valuable language.
What I don't think it is, is a well-designed one. It could have been all of those other things, AND a well-designed one, it just wasn't. I think it's a shame if a generation of web programmers come of age thinking that the warts of PHP are inherent to all programming languages. (I myself once felt that way about ColdFusion, since it was the first language I learned and everyone I worked with also only knew ColdFusion.)
That says more about the people you associate with then with the language.
The people I know care about programming, care about doing it well, care about elegant solutions, and care about a wonderful end product. What they don't care about are stupid language wars.
> the grass actually IS greener in Python and Ruby land.
I never got serious with Ruby, so I'll confess, I might be missing something. But, going by what I see in Destroy All Software's screencasts, I don't feel like I'm missing anything.
I can't help it, but ever since Rails came on the scene, I can't help but feel like the PHP people that make up the PHP community has dramatically improved. This, of course, is purely based on the people I've met.
I was just thinking this same thing. My background is mostly in PHP, C#, and more recently JavaScript.
Each of these languages is completely different from each other, but I haven't gotten to point where I curse the fact that one program is written in one language versus the other.
Each language has it features and pitfalls, but as long as you can accomplish the task you've set out on, I'm not sure that it really matters.
For example, I absolutely love the ease of passing functions around in JavaScript, but you can also make a real stinkin' pile if you don't structure things right.
Having used JavaScript, I find myself thinking about using delegates and anonymous functions a lot more in C# than I did before because I've seen the benefit of them in JS.
You can't tell a good programmer by their choice in language but in how they leverage that language to make awesome software.
> I've never seriously learned a second language, so I think it's a great language
Do the people you know have experience with other comparable* languages, and still think PHP is a well-designed language and platform?
I concede that the PHP community, and PHP itself, has dramatically improved in the last few years. PHP 5 is a revelation compared to PHP 4.
[*] i.e. not "The other language I know is C, and I love that PHP is so high level!"
For the most part, yeah. There are the obvious quibbles you get with any language, but for it's domain, it's the best bang for the buck. Does that mean it's the only language in our stack? No. But for my money, for the web side, it can't be beat. If I were to do a site in a non PHP language, it would be Python hands down. That being said, it all depends on what the project is, and what it entails.
Listen, I can't help but wonder if your imparting some past on the current crop of PHP developers (and by current, I mean those that moved to PHP5 some 8 years ago). Maybe you had experiences with another group of people that focus on just one language.
The PHP community of today is far from that. It's made up of practical people, who focus on more than just PHP. More to the point, calling someone a PHP developer these days just reflects that when they do the server side web code, they are using PHP. Not that it's their only language.
To be honest, my personal experience is that everyone I've met who pans PHP and proclaims to have switched happily to Rails (because that's what they switch to first, never Ruby), or Python is that they needed the extra structure these languages enforced. Basically, the PHP code they deride so much was code they helped write.
That, of course, is just my point of view. I don't know many people who use Ruby for web development, so it would be unfair for me to suggest the entire community was like that.
Is this the only thing upon which to base your opinion of a language? As someone who's seen at least a glimpse of the world beyond PHP, I'd concede that the design of the language, especially in earlier versions, is probably not its biggest selling point. But as you and I agreed below, PHP derives its value in other areas.
Maybe it's implicit in a question like "What's your most disliked programming language?" that those other areas should be excluded from consideration, but if that's not the case, then focusing solely on language design is a bit unfair to PHP.
Keep in mind, the design of the language wasn't to create a new language, but instead, make using various libraries easily usable in a web environment. Hence the reason for the multitude of c or c-like functions. Eventually, the shift moved in a different direction.
I like to think that while PHP wasn't intelligently designed, it did evolve. And for my money, evolution beats out intelligent design.
You can't program if you use a broken window as a measure of whether you use the language or not. I do not know of a language without issues, ugliness, or mistakes.
My two biggest gripes with PHP:
1) No standard package management system. I worked with some VERY smart developers at a PHP-only company, but nearly every part of their complex system was coded in-house, from the ORM up. Rubyists practically never code things that are available as well-tested gems, saving tons of effort, debugging, and training new people. That's a huge boost to Getting Things Done.
2) Little discoverability. If you can't remember the string method you want, you'll have to Google - and make sure you notice the order of the arguments. In Ruby, you can do `'foo'.methods.sort` and see all the methods available on strings. Since it's OO, you don't have to pass in the string itself, so there are fewer arguments to know in the first place.
To clarify, I have no feelings either way. I've had to learn so many languages over the years that I just see them as another tool in the toolbox. Life goes on.
If you are hiring, you are not hiring 10000 people, you are hiring one or two people.
If you can choose between a pool of 10000 developers in PHP and 100 in Haskell (whatever...) you will probably find more candidates you want to hire in the second pool.
And it is certainly more likely that you find the appropriate candidate if you don't have to wade though hundreds of applications.
I, for example, really love APL. I would also never think of using APL as the basis of a commercial project unless there was an overwhelming reason to do so.
A friend of mine built a nice company around a product built entirely around Forth. He loved the language. And, he lived to regret making that decision. He eventually paid gobs of money to have the entire code base re-written in C. A couple of years later he sold the business for several million. Potential buyers did not want to touch him with the Forth code base. Just a reality of business.
To clarify, the potential buyers were not interested in the Forth code base because they did not use Forth themselves. Acquiring a company whose products were based around Forth would mean adding a new layer of developers to their team and, effectively, byfurcating their efforts and skill sets. A code base written in C was a no-brainier for most interested parties. With C on the table the language was just a check-box item that did not require further discussion. With Forth the discussions stopped right there.
Again, nothing to do with the merits of the language and everything to do with business realities.
If the poll were "what is the most common back-end web development language" or "what language should a startup use in order to have the easiest time finding developers", you would have a legitimate gripe with those who chose, for instance, Prolog. However, that's not the case here.
+ know PHP
+ are experienced enough to deliver a working, maintainable application
are also fluent in at least one of ruby or python, both of which are much nicer languages in general and have strong web-dev presences.
The issue with hiring "people who know PHP" just because a whole lot of people know PHP is that issues with maintainability of whatever gets written tend to be much more of a pain than with similar projects in other high-level languages.
It's not, of course, that you can't write a ball of unmaintainable mud in any language -- you certainly can. PHP is lacking in areas that make fixing that less of a nightmare, and lacking in areas -- both in the language, and in the community for lack of a better term -- that make writing maintainable stuff in the first place easier. The devs who know how to create maintainable PHP codebases, or fix unmaintainable ones tend to have experience with other languages.
This should be, in my opinion, a pretty major concern for business. While it may not be apparent at first, there tends to be diminishing returns from maintenance and development of a product if it's a giant mess. Doing PHP on new projects for ease-of-hire is inviting that mess, due to a whole bunch of little things that tend to snowball. Skilled people won't want to work for you, people that will be skilled but lack experience will leave your employ, and eventually the project will grind to an iceberg pace and stress levels will get high for everyone.
A good dev will probably not have a problem picking up whatever language, as long as you're using "general-use" languages. In the web-dev world, this is currently mostly ruby and python. Choose haskell, and you'll probably have some (read great) difficulty finding people to hire. Choose ruby or python and you'll be more likely to attract the type of devs you want, and at the worst you'll get someone inexperienced who makes a mess that is easier to fix than it would be in a PHP codebase of similar messiness.
If it was just the merits of the language, I don't think I'd have much of a leg to stand on talking from a business end. It's not though, it's a whole lot of little negative things that can make a long-term project more likely to be a failure. The language, and the tools, and the community are getting better, but that's mostly due to the efforts of people who are skilled and experienced with a variety of things improving it because it's paying their bills. It's still far, far away from any other "popular" language in terms of tools, community, available libraries, and just about any other measurement you can make other than "number of people that can say they know it on a resume"
I'm not sure I follow this. If you take one of these good developers you are referring to, and write your codebase in PHP, what about PHP makes it difficult to maintain as compared to Python or Ruby?
If you take a developer who isn't as good, or isn't as experienced, and they create a ball of mud, it's easier to get it to a maintainable point by a good dev if it's written in a language other than PHP.
Some things about PHP that make it difficult to maintain over time are things like lack of consistency in abstraction, lack of first-class objects, extreme behavioral dependency on php.ini, incomplete reflection capabilities, and so on. These types of things are much bigger of a deal when trying to refactor a messy codebase as opposed to developing on a pretty clean one. They're getting better as time goes on, but the other popular web-dev languages are miles ahead, and it's extremely likely that a good dev capable of writing PHP code is familiar with one of them.
Sure, he might not be able to hire 80 programmers in one batch, but I don't think Jane Street would need to do that, or that they are worried about a shortage of OCaml programmers. Also, I would be more confident of the capabilities of an OCaml programmer than of a PHP programmer.
I'd be willing to wager that there's hardly an OCaml programmer in this world who isn't also skilled in a few other languages.
What it means is, People who learn OCaml generally have to learn something else too. Because the jobs just aren't there. Which in case the person is better off learning that something else properly.
And that is a very big problem.
Would you trust your product to the kind of developer you can easily hire?
Developers can learn new languages if they need to.
function myFunc(ObjectType $arg1, array $arg2) { ... }
And it'll throw errors if you try to pass an argument of the wrong type.> Is that new? I don't remember it from my php days. Although I'll freely admit those days were a long long time ago so "new" for me may actually be pretty old.
So, what you are really saying is:
> I chose PHP because it's gathers everything I hate about any language in one spot when I last used it... which was a least 8 years ago.
Go/Golang is indeed an amazing language -- my favorite, in fact, even beating out Python for my #1 spot. Go's creators guarantee its type safety; what hole do you speak of?
To hopefully assuage your concerns and to make an assumption about what you may worry is a hole in Go's type safety...
Empty interfaces allow one to contain _any_ value (such as a string) in an interface{}, but in order to use such a value, one must access the underlying type of the interface{} (i.e., the aforementioned string value). To do so, a type assertion is required, thereby preserving type safety... unless I'm missing something?
The hole occurs when I want to make a generic container like say a binary tree. I can create a node interface that satisfies my needs for a binary tree. What I can't do is guarantee that at compile time every element in my container is of the type that I expect. If they ever add generics of some sort this hole will be closed. It's a very tiny one and can usually be limited to a single functions scope but it still exists and certainly not enough to make me dismiss the languange out of hand. You can see examples of the hole by looking at Go's container/* packages. Some of them had a completely separate implementation for each of the primitive types. Type assertions ensure type safety at runtime provided the programmer does their job. But it depends on the programmer doing their job so it could be better.
Go and ML were two examples that come the closest to my "ideal" language. Go just happens to be one that I have the greatest chance of actually using in a job :-)
container/* is a bit of a corner case which is rarely used, specially since append() was added to the language and container/vector was deprecated I can't remember the last time I needed anything from container/*.
2) The community. Surely there's a lot of garbage code floating around in the community, but are we going to judge a language by its community now? Perhaps the community is so big it produces a fair amount of garbage code appropriate to its size?
4) Ugly to look at. Perhaps, if you write ugly code. Again, this is about the programmer and not about the programming language. I think I write pretty code.
Disclaimer: I am a PHPer most of the time. But I realize that PHP is probably on its way out in the long run. And I agree with your two other points.
I chose ActionScript because it's a PITA to debug. Good programming languages make it easy to find your mistakes. PHP is good at that, as are a bunch of other languages.
The community is a huge part of judging a language. You'll note that I specifically said this appears to flow from the core developers out. A sentiment many in this thread appear to have shared. That to me is a danger sign. The community often is a signal regarding how the core devs of the language approach things.
As for beauty it's completely and purely subjective so what looks beautiful to one person can look ugly to another.
The reasoning is explained well in a post by Terence Tao [1] in the context of 'List of the worst movie of all time'. Briefly, assuming that there is at least some correlation between programming language quality and uptake of that language (which doesn't seem to be controversial, especially among the users of HN) then you expect that languages which are generally worse will not be used so much, and so there will be fewer people who are able to vote for them as being "the worst".
For example, I have never used Delphi (to pick an example at random). I know literally nothing about it. It could be a stinking ball of crud that irreparably crushes the soul of anyone who tries to use it, but because it's not that popular, I've never used it, and so I'd never get to vote it down for being the horrendous pile of fecal matter that it may well be (I repeat again that I know nothing about Delphi, and it might be wonderful - I'm using it to illustrate a point).
If you make some simplifying assumptions about the probability that someone has used a language given its quality, then you can demonstrate that the language which will end up topping polls like this is whichever one is "just good enough" to be popular - which in this case means Java, C++ or Javascript.
[1]: https://plus.google.com/114134834346472219368/posts/TPjSPPd1...
If you want a language that was designed to be bad look at Malbolge or INTERCAL.
Fortran is like C with great math support; that is to say, C is like Fortran with great systems facilities. In each language's domain, it is more expressive and more performant than Java. Outside its domain, you don't want a bad programmer going near it for too long, but you can absolutely still get things done.
On the other hand, Java fills me with such dread that I would write a post defending Fortran just to kick it in the nuts.
What problem is it that Java solves well? That is what makes java such a shitty language to program in, for any particular problem you encounter there are much better languages to solve that problem in, C# comes to mind immediately as to what Java should be.
Note: Yes I realize that Java has excellent cross platform support and a huge ecosystem, but we're talking about languages, not the ecosystem.
I've been on python projects that need to grow but struggle b/c all the things that make it easy to get a lot done the first few weeks become liabilities very soon. Adding developers to a project that doesn't declare types and encourages just passing around hashmaps is brutal. All the stuff you can't do in Java makes it easy for someone else to understand it and edit it.
I would believe that C# might be a bit better but only being fully supported on MS is a non-starter for many server side situations.
That wasn't the goal of Java, not by a mile. The goal of Java was to build a language that runs everywhere, and to facilitate Sun's "everything(your watch, toaster, pc) is networked" ambition.
All the things that people flout about Java saying that how it helps them manage large projects(completion, re-factoring, ide integrated debuggers, good libraries) wasn't even a twinkle in anyone's eyes who was involved with Java development. Java's initial release was terrible - it didn't even have decent stdout facilities, was interpreted and as a result dog slow, took a long time to load the jvm, and essentially failed it's "write once, run everywhere" motto as it became "write once, debug everywhere" in practice.
Java has evolved, mainly because people bought in the hype. I don't know why people stopped questioning the hype.
"Look, we are totally object oriented."
I am not sure what it means for me as a developer. So, what about classes? Are they objects? Packages? Are value type objects?
"Ummm. No it doesn't matter. Just listen to us. We are object oriented."
"Our goal is 'write once, run everywhere."
Your awt looks like dog shit on both windows and linux, and is slow.
"Hey. We didn't say anything about 'looking good'. I can bet it looks equally crap. That's platform independence."
> In some ways that sounds terrible by itself, but I think it turns out to be legitimate.
If that's the actual goal, it isn't terrible at all. Why do you think writing large programs quickly is a terrible goal?
> I've been on python projects that need to grow but struggle b/c all the things that make it easy to get a lot done the first few weeks become liabilities very soon.
And those things which make it easy to get lot done in first few weeks but are liabilities would be?
> Adding developers to a project that doesn't declare types and encourages just passing around hashmaps is brutal.
I understand time complexity, space complexity, and api of dictionaries. If you needlessly wrap it in your class, I couldn't know anything without reading through your wrapper. What exactly do you gain by wrapping dictionaries?
> All the stuff you can't do in Java makes it easy for someone else to understand it and edit it.
Examples please. If your developers have an easier time understanding implementing an interface to sort, rather than saying persons.sort(key=lambda a: a.name) then I don't know how that can be remedied.
> I would believe that C# might be a bit better but only being fully supported on MS is a non-starter for many server side situations.
The list of things which aren't supported on mono is small, and basically includes things which won't run outside of windows(office interop) or are deliberately dropped(WPF).
I agreed with him.
Minute later he understood what he said <grin/>
The aging Cobol cohort.
Java's cross platform support is awful if you go anywhere beyond Windows, Linux, OS X and Solaris (and even there both OS X and Linux have second-class status at best and suffered from serious issues at least until recently). Even Python and plain old C (if you know how to write portable code) are much more portable than Java ever will be.
And many would say the "huge ecosystem" of incredibly big and complex "frameworks" and tools is part of the problem with Java, or at best one of the symptoms of Java's problems. As others have pointed out, IDEs are language smells, and with Java using the language and surviving in its 'ecosystem' basically requires it.
I personally would even say that Java the language is considerably better than Java-the-ecosystem, but using the first without the later is almost impossible, and there are much better languages around anyway.
- C only got a memory model in C11. So you can't be sure your code does what you think it does, without compiling and testing with every compiler for every platform you intend to target. - C is a low-level language which has its niche. But most of the time you want quite different features, like runtime monitoring, inspection and debugging. - In C you can't just move your binary to a different architecture and run it there, same thing in Python: You can't just deploy your pyc or pyo files on a different machine and expect it to work, especially not if the versions differ. - You can't even do that for source files: Python breaks compatibility frequently, and because it is dynamically typed, you can't just check the signatures that nothing has changed and chances are you won't even see breaking changes until it crashes at runtime. - Python is not nearly as fast as a decent JVM. - Both languages lack a cross-platform UI toolkit, although yes, AWT and Swing suck, and JavaFX isn't that great either.
I agree though, that the whole "framework" stuff has grown out of proportions in Java. It is just a disease if a simple application ships with 40 MB of JAR files because the developer couldn't write any non-trivial functionality himself.
> IDEs are language smells
This smells like envy from someone whose "favorite" language lacks good IDE support, but yes, Java-the-language is just outdated.
> Java the language is considerably better than Java-the-ecosystem
WUT? Java-the-language is the weakest part. You don't have to use any Java library or framework at all and Hotspot is probably the only freely available VM which is fast, mature and stable.
Any language that requires six spaces at the start of the line in order to maintain legacy punchcard compliance makes me gag.
fortran90 or hpf on the other hand are pretty useful in their domain.
Delphi was a framework using Pascal. It was a revolution at the time - and you can see it's influence in many software tools available today.
You could argue that the current SQL/Rails API/JSON/Backbone/JQuery/CoffeeScript/HTML/CSS abomination we've created could be improved or replaced with something as disruptive as Delphi was at the time.
I guess, it's the agreeing on something and then adopting it and then having it catch the market part that's making this difficult.
On another field that I follow, we haven't had anything better replace MIDI for like 30 years...
That means if you want an analog like continuous change from 0 to max for some audio property, you get stepping instead.
It's also not very fast for todays work with tons of channels.
I doesn't know about audio at all, etc.
OSC is a better replacement, but not widespread enough.
As for what's wrong with it:
- better support for non-blocking requests - better support for streaming media - better support for caching - better content negotiation (e.g for "retina" x2 assets) - better authentication mechanisms - better support for encryption
Also check: http://static.usenix.org/event/usenix99/invited_talks/mogul....
We wont be incredibly enlightened but it will be interesting to see the results and what that tells us about HN readers. Perhaps we'll learn some interesting stuff from the comments as well.
On the other hand, what it still does well, decade after decade, is pump a 30MB native standalone executable from millions of SLOC in minutes, one that will run on any Windows box without installing any libraries or runtimes. That is, in its own way, impressive. Many businesses still depend on it and instead of an OSS community you wind up licensing libraries from the few remaining dev shops.
And back in the day, when .net was awkward to use and Java was too slow, Delphi was the king of RAD. Unfortunately they didn't even try to keep up with .net/Java, for example, proper Unicode support wasn't added until Delphi 2009.
In fact, the same person that invented C# first created Delphi (Anders Hejlsberg), and you can see how C# has borrowed much from Delphi.
Delphi, in the past 3 releases, has added native generics, anonymous methods, Unicode throughout the language by default, compiling native OS X applications, compiling iOS applications, and writing native 32-bit or 64-bit applications.
In addition, Pascal (and Delphi) does not have many of the serious security issues C/C++ developers have experienced, by design; e.g., format string bugs are non-existent because Delphi allocates strings on the heap.
Also, the Delphi community is alive and well over at StackOverflow. Unfortunately, many new developers in the US aren't familiar with Delphi...but it's extremely popular in European countries. It really is worth considering if you are writing native Windows applications that require complex GUI's done easily.
(makefiles are turing complete, so I think it qualifies as a programming language)
If we're talking about programming languages I hate but still use, I'd have to go with Python. I spend most of my time writing Haskell, and Python's dynamic typing puts me on edge. I might spend half an hour evaluating a Python script only for it to throw an AttributeError because I mistyped some function name or passed the wrong type.
Does anyone know a static analysis tool for Python? I found one a while back but when I tried it it threw (you guessed it) an AttributeError on NoneType.
DuckTyping is the most deeply misguided aspect of python. With the discover of Hindley-Milner type inference 40 and 30 years ago, this sort of sloth is simply inexcusable.
Pythonistas will say "Oh, I don't care if it's a duck or a swan, as long as it quacks." Guess what? You can treat function calls as a statement that an object is an instance of some typeclass and that typecheck that. With a sufficiently intelligent compiler/interpreter author this is transparent to the programmer.
And to confuse matters, Python 3 added optional type annotations that are ignored by the runtime!
It would be totally possible in python to write a class where when any arbitrary method is called on a class, a function is randomly generated and called, with a random number of arguments, etc. It doesn't even have to be consistent from call to call. How on earth would H-M type inference cope with that?
The fact that Python allows you to do something absurd is simply an argument against its design.
Edit: Uh oh, looks like I ruffled some snakeskin!
I think it comes down to namespacing: we use modules to prevent naming conflicts, allowing us to compose two modules, but if we do the same with objects their attributes conflict. In Haskell everything has a namespace — there are no methods, only functions — and type classes provide polymorphism without (henceforth) 'quack conflicts'.
Two terrible examples of quack conflicts from the Python standard library are '+' meaning both "add" and "append" (the latter being non-commutative), and the comparison operators '<', '<=', '>=', '>' actually meaning ⊂, ⊆, ⊇, ⊃ when dealing with sets.
I especially don't understand the point of a VM like the CLR that only runs on one platform. It's fucking retarded.
On top of that, after having worked in an "enterprise C#" project for an unfortunate year, the kind of person who thinks C# is a really neat idea just doesn't get along with my style of programming.
I had to reiterate constantly "Do the simplest thing that will work". And they would get pissed at me whenever I inserted something at the wrong layer of their pointless abstraction hierarchy. Delegates, XML, and design patterns abstracting ONE thing where everywhere. It was fucking horrible and it took the team forever to get anything done.
It was also difficult to get stuff across the managed/unmanaged boundary without a lot of verbosity and overhead, so optimization was unduly difficult.
But really, it's not the language I hate, the language is mediocre, its the ecosystem around it that's terrible.
Personally, I don't mind C# much (I do work at an MS-centric shop), but some of the baggage that comes along with the .NET framework can get bothersome.
That said, when people do have to use Python, like in my compilers class right now, quite a lot are not happy with it. (Even the professor gets annoyed with it; I really don't know why we're using it.) So I think there is just much more selection bias in the land of Python than in C++ or Java.
People use C and C++ when they need fast code close to the machine. People use Java when they need more portability but can't sacrifice performance completely. People only use Python because they like it.
And weird level of verbosity for a scripting language.
I am seriously considering excising Java from my cv and replacing it with something I would be more comfortable with - like Mumps :)
Terrible language that produces (seemingly automatically) terrible software. It also rots the brains of those that are forced to use it.
All of those listed have their charms - seems hard to dislike them in the main.
In particular, a sensible coding style and sensible development practices (yes, name your variables sensibly! yes, use source control! yes, have code review and automated tools to catch common errors) can remove the bad. It also helps if your company wrote its own (quite good) IDE for the language so you don't have to use Intersystems'.
Honestly the most fun thing about M/MUMPS/Caché is that there's very little boilerplate and you can write sensible code quickly. It's like being stuck with Java and then suddenly moving to Python or Ruby. (With, yes, a few pitfalls that these languages don't have, and quite a few features missing. I still prefer modern languages for personal projects. But you quickly pick up a sense for practices to avoid.)
I can't say all companies that use Mumps are great places to work. But mine honestly is. </soapbox>
I should try to get him to post to talk about it, but he created an object-oriented version of MAGIC that supported longer identifier names and other more modern constructs, as well as an interpreter that spewed out perfectly standards-compliant MAGIC. Originally he was barred from using on existing, but eventually got approval to use it on new projects and I guess some portion of the MEDITECH developer population uses it over plain-jane MAGIC now since it's substantially easier to write and maintain.
Though recently he's reached out asking about the job market. He's been there since his early 20s and now is in his mid-30s and feels as if he's dead-ended himself on the job market unless he gains familiarity with something else. I think he's finally looking to break away from MUMPS.
I spent a few months writing reports in MEDITECH and their macro language is a variant of MAGIC. Documentation is a closely guarded secret but you can get a taste of what it looks like here: http://www.99-bottles-of-beer.net/language-meditech-magic-38...
A few years ago I would use PHP because it's so horrible and it destroyed a lot of innocent souls who entered programming via it, forever damaging their understanding of consistency, abstraction and modularity. But these days PHP is a dying emperor and there's no much reason to care. Visual Basic is even more strange choice because the language is not as bad (primitive, but not very bad) and you can skip it.
People pick JavaScript because they don't like not having choice + having to adopt to quirks, but on other hand we could never get anything better. Imagine if browsers defaulted on some kind of BASIC (no OOP, confusing data types, obtuse data structures, no hash maps, huge confusing spec) and that's what we'd have to use? Brendan Eich is a genius, he created a language for twenty years in ten days.
Java: Those who actually write in it have reasons to hate it, those who don't just translate their groupthink, I believe.
Problem is, surprisingly, nobody does! And the sandboxing would be huge too.
After you do that you have better chrome than Google does and you can start distributing it. It's in fact doable, once you have a set of patches, to reach some audience with that build.
Its support for basic things like string and file manipulation is weak (after seven years, I still have to look up the order of the parameters for the findstr and strfind functions). Object-oriented facilities were only added a few years ago. Closures were likewise added only within the last few years. Anonymous functions are restricted to just one expression (wtf?!).
It's quite expensive, typically costings hundreds or thousands of dollars, and yet is usually too slow for more intensive applications. The recommended optimization method, vectorization, tends to be be incredibly memory-wasteful, negating any code savings. Its GUI building tool is more primitive than anything built since the mid-90's.
And the default indentation level makes it hard to pick out separate functions in a file, to boot.
The Mathworks is the Microsoft of science.
The pleasure of watching the old classics come back for another run is tempered by the fact that what has come back is yet another language war.
Oh, well. My favorite least-favorite programming language is the Central Dogma. Gotos. Self-modifying code. Code that deliberately recompiles other people's code. A potentially infinite series of build steps. Not intuitive to read. The output often makes no sense. Very few comments. Nobody seems to have written a manual. And the bootstrap process takes a really long time.
Like anything, practice makes perfect. Read more Perl and reading Perl will become easier.
I mean, yes, by default, I do a lot of things that Python requires. However, that does NOT mean I need a stupid computer program to rub into my face what I am supposed and not supposed to do. Oh, and for an incomplete, not fully ideal language (look at it stupidity in lambda form, fake private fields in classes), it's a sorry excuse for a preacher who attempts to "right" already right programmers.
Programming is about self expression, about creativity, and about practicality. It's not about preaching, high ideal, and hypocrisy. Reading Python's mailing list always makes me want to puke and stab someone.
Lastly, Python's popularity constantly reminds me of the sad state of, you know, freedom of speech, expression, and thinking. Oh, did you realize that the only thing Python is better than other languages is its library? Yeah, the language itself sucks, restricts people, cumbersome, and fails to implement all features (again, lambda and private). Yet, it's popular. Sad.
My first exposure academically to a programming language was Visual Basic. This was what they "force-taught" at school.
I already had experience with Java/PHP/C, and just wreethed inside with disgust at the rationale for learning Visual Basic. It was a horrible experience that was forced upon me by my school's teacher. (I was about 16-17 at the time I think).
As a form of silent defiance, whenever I had to declare a variable, I would call it `dim $%something%`. Ha.
As for why I hate it so much, the arguments are well known: the language is overly complex, not very consistent, generally unsafe with regards to exceptions and memory management, and widely used for applications that could have used a garbage collector. C++11 solves parts of this, if your team observe very clean coding conventions, and at the price of an even more complex language.
For my favourite language, see http://news.ycombinator.com/item?id=3747696 (The current answer is OCaml, but I now know of another approach that looks orders of magnitude better.)
I do mainly PHP so it's not like I can't overcome bad design. I routinely try to get a fresh perspective of JS but it does little. I praise jQuery everyday though.
On the other hand, there's a LOT of warts in the language. Random reserved words like 'class' that don't even fit the language's approach, variable scoping that can very easily bite you in the ass if you don't know what you're doing, optional line terminators that seemingly exist for no reason other than to create bugs, stuff that should be avoided at all costs like 'with'. And that's just scratching the surface.
Javascript without the tools would be a real pain.
1. Ordinary people trying to get something done. Often not professional programmers. These people account for most JS on the internet.
2. JS hipsters. The kind of people who use Node.js and worship Crockford. They refuse to accept that anybody might want to use a language other than JS on the web, or that if you only accept the "Good Parts", you'll be set for life (where's my static typing, bitch?).
Languages are as much people as they are technology. I use Python because I like the people who use Python. I use Haskell because the people who use Haskell are really gentle and humble.
Good, reasoned people lead to good, reasoned code. I don't see that with the JS community.
There are only two kinds of languages: the ones people complain about and
the ones nobody uses. Bjarne Stroustrup- Using Oracle - Rarely contributing to FOSS - Using very non-agile development methods - 9 to 5 corporate culture - Bad UIs and boring software overall - Terrible web accessibility and standards conformity - Hearing people say, "Its better than Delphi" as a comparison point
But those are just my experiences in working with teams using .NET. My run-ins with .NET have only gotten worse since I moved to Columbus, Ohio. I don't know anyone in the Valley using it, but people working for insurance companies seem to love it.
A couple weeks later I discovered the wonderful world of Linux and never looked back.
1) First category is where you are forced to use it, and it is easy enough to get started in. For these languages the programmer base is big enough for the mandatory awkward features of the language be stumbled onto frequently enough to gather all the hate, and also big enough for the language hating to become a pop culture. Javascript, Java, Objective C, Visual Basic, PHP are languages in this category.
2) The second category is where you are forced to use it, but the language takes a long time to master, there are so many rules to learn and practice that unless you have spent 10 years coding in these languages, you cannot call yourself an expert. The hate for these languages is a different kind of hate and it spawns from the programmer's frustration to conquer the language completely. It's anybody's guess that C++ is the language I am talking about.
3) The third category is where you are forced to use it, and learning the language is just an annoyance mainly because it is just a different syntax for a language you have already learnt, and the learning effort that you put in is not commensurately rewarded by expanding your mind by introducing you to new ideas in programming. Ruby (does not add anything to Python), C# (does not add anything to Java), Coffeescript (does not add anything to Javascript) are such examples.
One constant across language-hating is that the programmers are forced to use them, either because their jobs require it (Java, C++, Visual Basic), or it serves a niche where there is (was) no equivalent (C++, PHP, Ruby on Rails, C#, Javascript, Objective C).
Then there are languages like C and Python, which are so freaking awesome, groundbreaking, and so much valuable for their niches that they just simply cannot be hated.
2. Saying that C# doesn't add anything to Java isn't even a simplification, it's flat out wrong. That argument may have been slightly valid in the C# 1.0 days (although there were quite a few differences like auto-boxing, properties, and pointer support), but the languages have diverged significantly, and modern C# code using lambdas, LINQ, and dynamic variables is signficantly different from Java.
Similarly, CoffeeScript and Javascript are massively different languages - the fact that CoffeeScript compiles down to Javascript doesn't mean the languages are similar, any more than saying Clojure and Java are practically the same since they both compile down to the JVM.
About you comparing CoffeeScript with Clojure is not fair at all. Clojure gives a whole new world on top of JVM, while CoffeeScript is just syntactic sugar for Javascript.
CoffeeScript has significantly different syntax from Javascript, different variable scoping rules, list comprehensions, a class system, and a whole lot of other features absent from Javascript. If you showed both languages to a programmer who wasn't aware that CoffeeScript compiled down to JavaScript, I'd guess that they wouldn't see much of a relationship between the languages at all.
Actually, add regex to my hate list.
To me it is roughly equivalent to JavaScript - both have some syntactic sugar that the other doesn't have. But JavaScript has full power lambda and is overall much more elegant in my opinion (in the sense of needing less concepts to achieve more - basically it is all hash maps and functions).
Perhaps CoffeeScript is the solution, haven't really tried it...
It's frustrating that in shell scripting gap between "looks correct" and "is correct" is enormous.
Whitespace, leading hyphens, paths, globs, shopts, masks, signals, race conditions and POSIX compat problems and quirks — there's always some edge case.
Even `echo` can't output arbitrary values in a portable fashion (sometimes accepts `-n`, but doesn't accept `--`).
I would have said "Visual Basic" but I have not had to use it in a long time. But I cannot avoid using the damn SQL!
http://developer.apple.com/library/mac/#documentation/Cocoa/...
I'm not going to hate on it for all its foibles, like the $ before variables and the jumble of functions that constitute its standard library which totally lacks any and all kinds of namespacing.
The real reason behind why I hate it, is because as a newbie, it let me do things that are now, in hindsight, terrible practices. Things like including mixing code and markup outright, placing source in public facing directories, and not to mention the myriad PHP tutorials which encourage handling paths using simple concatenation.
A better language, I feel, is one that 'pushes' against things that are wrong, and makes them harder to do.
I'd also have voted for Java if I could, for no other reason than its verbosity.
ps. If you're wondering, I like Python most.
There is so much that is good about Java language which I take for granted after working with it for years and yet, given my daily use of it, I see the things that it is sorely missing. I'm a huge fan of Clojure, and have worked with JavaScript a lot too... and in the end I gnash my teeth at Java for lacking immutable data structures and lambdas/first-class functions. If/when these two items become parts of the Java language and JDK, Java will be a language which I (again) find a pleasure to use.
I want to do some simple automation on a website. Because I don't like PHP, I have to pay a premium for a Windows based host that supports ASP.NET.
this goes to show just how easily a well-written framework can change the whole perspective on a language.
another good example is ruby, i doubt ruby would be this popular if it wasn't for the rails framework.
one language that i do like at a glance but haven't had the experience is python. seems to me like it's the easiest language to learn (especially easy on the eyes, good readability) and it's not a surprise why people like it the most here on HN. but one being gripe about python is that it really is a pain to get the environment setup. i've had a friend who worked a backend-piece for me written in python 2.6 and i had a chance to setup the environment first-hand myself to get it working and i must say it wasn't really a pleasing experience. i'm not sure if he just does "things" differently or not but he told me that i need to setup python in it's own container to not conflict with system python because the one he was using was a different version of python. not only that, the pain i saw really came from him having to load a plethora of modules to just get his app work (like modules just to convert decimals?). when it comes to portability and readiness out of the box to start working, i think python still has some ways to go.
If you are a good C++ programmer you still lose, because with a programming language where 90% of your talent is not bound up in foot-shooting-avoidance, you could have been doing fucking amazing work.
Actionscript -59
Ada 8
Assembly 53
C 809
C# 626
C++ 29
Clojure 386
Cobol -51
CoffeeScript 245
ColdFusion -43
D 38
Delphi 6
Erlang 133
Forth 24
Fortran -9
Haskell 445
Java -324
JavaScript 899
Lisp 258
Lua 123
OCaml 63
Objective C 113
Other 148
PHP -254
Pascal 6
Perl 105
Python 2639
Rexx 2
Ruby 1346
SQL 29
Scala 181
Scheme 149
Shell -25
Smalltalk 47
Tcl -1
Visual Basic -445
(Negative numbers mean the dislikes outweighed the likes)
That said, this poll is not online for the same period of time. Not that negative points could take away anything C++ can do for me.
I listed C++ as a dislike, and I believe it deserves the hate. C++ basically means full employment for PL engineers (like myself) to build decent parsers (C++ is almost unparsable), compilers, bug checkers (C++ code is dense with bugs that can be found via analysis), and so on. I came to a point in my career early on where I realized that this was just ridiculous, so I got out of the C++ tool industry just as fast as I got into it (and worked on Scala instead, sort of ironic).
Many people have to use C++; e.g., if you are writing embedded systems, OSes (device drivers), or games. Most everyone not in those industries will just continue to stay away from it.
I wouldn't have cringed so much if I hadn't have been developing in nodejs and php prior.
I like Linus.
The biggest advantage of declarative programming is that the compiler's got more information to work with, and then Prolog throws this away with weak typing and weak moding (every predicate is nondeterministic by default).
These languages also score highly on the Favorite languages list.
- B. Stroustrup
The real issue is how over-hyped Python is--everybody wants me to use it. I can avoid other unfortunate languages like PHP or even Java fairly easily, but everywhere I turn Python is basically shoved in my face.
It's also constantly heralded as a well designed language when most of it is anything but. I don't even think it's the best dynamically typed language--out of the ones I've any experience with, Scheme, Lua and even JavaScript (aside from the DOM and browser stuff) are nicer and more elegant. Python is bigger, more complicated and yet less expressive than any of these languages (especially Scheme).
It seems to share a philosophy with Java (we can't let programmers have anything they might possibly shoot themselves in the foot with!), which does not make for a language I would like to use.
As I've said, its faults are not unique. It's a sub-par language in a sub-par world. But for some reason it's elevated as the paragon of language design and used widely.
Of course, there are plenty of communities that do not like Python--it's only overrated in the HN sort of sphere. Low-level programmers like C and C++; enterprisey types like Java and C# and neither like Python. I am not interested in either community myself, however.
The one community that I am interested in, and that doesn't like Python either, is the programming language group. Comments on Lambda the Ultimate are much more critical of Python than comments on HN.
So yeah, I like Python less than even Intercal, simply because I've been forced to use the former and will never have to use the latter.
So we have more experience with languages we like.
And, C++ must be destroyed.
In ActionScript everything is an Java-like object. Adobe decided to implement the unfinished ES5 draft where you have JavaScript with "classes," they also put the Java-like limitations of one class per file/package, and having classes do almost everything (instead of functions). If a Java gal went to AS she'd, optionally, want to incorporate closures as a tool.
You can approach Python lot like you would JavaScript -- some functions, some classes, passing around functions/classes as arguments, closures, etc. (I bet that I could replace my JS with Python pretty easily if browsers supported it). If a Python guy goes to AS all he'd really have to do is add types, put every class in its own file, and drop functions (in a few cases).
I wouldnt necessarily say that it meshes the two together, but I do feel that anyone who is comfortable with either Java or Python could be very productive with Actionscript in a short time because of how tightly loose it is, lol.
The answer is that a good gardener can create something amazing with a stick, but a bad one can't, even with a truck full of tools.
SQL also pisses me off, because I use it on a daily basis and it's so weak.
It would take me too long to detail all the reasons it sucks. I can't count the number of times I've cursed it.
Poll: What programming language will provide the most career benefit over the next 5 years?
Maybe someone with enough karma (20) could create it?
Or maybe:
Poll: What language are you going to learn next?
Its structure and syntax have nothing from good design.
· http://koldfront.dk/misc/hn/pl/data.png
I would like to make a bar chart with favorite votes pointing up from the x-axis and dislike votes pointing down, but my rudimentary R skills doesn't stretch that far yet.
Here is the scatter plot on with log scales:
I've plotted the positions using proportion of max votes (as a proxy for response rate) to account for the different number of voters responding to each poll (with actually counts added). And my axes are reversed!
The bipolar bar chart you're aiming at should be pretty easy to achieve if you first make the dislike values negative. I'm happy to write some code to demonstrate if you'd like.
edit: link - https://gist.github.com/2206278
I use VBScript almost daily because I support an old proprietary system that offers 3 choices for business logic scripting (VBScript is actually the best of the three).
PL/SQL and T-SQL (and I'm sure there are others) would be more appropriate.
You know, those people who cannot form a sentence without the word "monad", who are all about purity and disdain for everything not Haskell.
time python -c "for i in range(int(1e8)):pass;"
time php -r 'for($i=0;$i<1e8;++$i);'
go on, run the commands.
- "I love you"
- "Me neither"
My vote for Perl
I doesn't matter if I like to work with objective-C or not, if I need to build an iphone app, it's the tool I've gotta use.