News for hackers. Stuff that matters.

notinfinland

Re:Ask HN: Time to give up on Qt? on Monday July 09, 2012 @06:33AM (#4217488)
Please provide some proof when making such extraordinary remarks. Given their requirements, these companies would have to be insane to try to build their apps with web technologies. Are you really suggesting that they do CAD and VOIP using JavaScript?!
It is not mathematically proven, but there are studies that indicate this (e.g Code Complete provides some)

This assumes that the code bases are of similar quality.

Re:Ask HN: Time to give up on Qt? on Monday July 09, 2012 @06:30AM (#4217478)
What is your cross-platform development experience and on what do you base your grandiose assertion?

I must ask because this just looks like webapp kool-aid. I am increasing my own investment in webdev and I still completely disagree with you.

No it's not. After the major Obj-C hype on HN I decided to learn it and was very disappointed.

1. C compatibility is a liability, not a benefit. Every language that has build on C is full of corner-cases, warts and undefined behavior. Obj-C is the worst since it didn't fix anything about C, it just nailed objects on top of it.

2. The syntax is horrible. People rush to say that this is not important, but it's HUGELY important since it's the only way that you interface with the machine, the text that you read and modify for the entire lifetime of the software - which could be years or even decades. Brad Cox failed to anticipate how object orientation would look like in future programming languages. Most languages either extended the C syntax for the object oriented part or got rid of the baggage. B.C brought us the e-mail symbol and writing + and - in front of all your member functions. e.g:

* You have to write @interface and @implementation and @end because apparently it was too much work to write a decent contextual parser.

* @"char" instead of automatic conversion

* @ as placeholder in string formatters. I see a pattern here...

* You must use () around return types. This is piss poor programming language design: thanks to the +'s and -'s you already know you're looking at a non-C function, but let's make the programmer dance around like a little monkey.

* Must use pointer syntax even though you're forced to use pointers to objects anyway. Java and C# got this right.

* No operator overloading. Where is your Smalltalk now?

* Namespaces?

* many other examples

Obj-C assumes that it can offload the boring tasks to the programmer because such was the fashion in the 70s and 80s.

3. Verbosity does not help at all. You have to spend more time reading code, understanding code, writing code. If it has more LOC, it's harder to maintain, this is a proven fact.

4. The type system is as weak as C's, but dynamic typing makes it even more fragile.

5. Memory management in iOS is too complicated. Even with ARC you still have to do manual memory management in some cases. The fact that I call retain and release is not much better than calling malloc and free. Heck, it's easy to do similar reference counting in C. Several studies (please Google) have reported that iOS dev is more time consuming than Android and this matches the reports that I got from companies/people doing cross-platform dev. Obj-C is more complicated to program in than Java, in no small part due to memory management.

The final nail in the coffin is that this programming language is all but owned by Apple. The only reason to use it is if you're doing iOS development, but even there we're thankfully starting to see some alternatives such as Ruby and C#.

Re:PHP is much better than what you think on Wednesday July 04, 2012 @07:44AM (#4198953)
Interesting. What were they using, C++? I've heard about D...
Re:PHP is much better than what you think on Wednesday July 04, 2012 @07:43AM (#4198950)
You can, but I think the benefits are vastly overestimated. Languages are tools and the purpose of engineering is building, not having a tool fetish. This doesn't mean one should use bad tools, but when learning new frameworks or languages I almost always feel like I am wasting time.

The innovative ideas in programming language design are few and have been known for many years. Learning Ruby or Python instead of let's say Perl will bring you almost no benefits from a technical perspective.

You're essentially paying with your time to enter the Ruby&Rails ecosystem of jobs, consulting gigs, events and so on but you're still building websites using the same protocols, servers, databases, etc.

Re:PHP is much better than what you think on Wednesday July 04, 2012 @07:38AM (#4198934)
Well, OCaml and Haskell are nice, but I wouldn't think of using them for webdev. I would be literally unhireable in my area (major EU country).

I haven't done any webdev in years, but I am focusing on PHP instead of Python because I have more experience with it and it's easier to relearn. It will be a complement to my main skills which are actually mobile/desktop/embedded dev.

Re:PHP is much better than what you think on Wednesday July 04, 2012 @05:30AM (#4198586)
What do you mean by "more full-featured alternatives". To me the main webdev languages look about the same when it comes to the major features that have a noticeable impact on a project. e.g: few projects are affected by the lack of closures

And all the talk about real this and real that. I don't think projects become more real when they're written in Ruby or Clojure. They're real when they work and are useful to the customers...

Re:PHP is much better than what you think on Wednesday July 04, 2012 @05:20AM (#4198540)
Do you have inside info on this? I've seen several people from Facebook comment that they are in fact using PHP.

The fact that they're compiling to C++ is a consequence of the slowness of the programming language implementations of those languages that are used traditionally for web development. AFAIK Ruby was and still is the slowest of the bunch.

Re:PHP is much better than what you think on Wednesday July 04, 2012 @05:18AM (#4198531)
Well, we can all dream, but what are you using now do get things done and make a living? I'm pretty sure Python and Ruby fail your criteria.

Using the "perfect language" is a luxury that I for one can't afford. I need something that I can use reasonably easy and that is sought by employers. The fact that is has event-driven IO and parallelism (what kind of parallelism do you need for web sites?) is nearly irrelevant.