Hacker News new | past | comments | ask | show | jobs | submit login

Lately these questions and discussions are everywhere and most times I think people are missing the point: it's all about code you want to write.

We created all those high level languages to make code easy to read, to make them people understand. I mean you could probably write your website in Assembla but the language won't help you to write down what you really want.

As a developer you are trying to develop something you do not want to mess around with a language. The language you use should help you focus on what you want to develop not distracting you with "ugly" code.

If you understand what the code is doing (even if you coded it on your own you sometimes have to think about what is going on there) it lets you help to focus on your goals.

If you brain works better with PHP code you should probably use PHP as your coding language but if not you should try something else like Python, Ruby or maybe Haskel until you find a language which is boosting you while developing. Don't get me wrong I don't say a programming language should do everything for you while you are drinking coffee. No, it should help you to think better what to implement next and how to implement it. It should support you while reading and understanding.

Again, we only created all those high level languages to make it easier to understand.

And now my standpoint to PHP: I don't like PHP cause it is a noisy language IMO. PHP is not OOP. You can use OOP in PHP 5 but the PHP core is not OOP so this seems weird. Even in PHP 5 you can't get a string length like: $str->length No you have to use strlen($str) and this is ugly.

Also I don't like those "symbols" PHP is using (maybe symbols are not the correct word here but I can't find a better fitting word at the moment). In PHP you have variable names with a $ symbol. Why? I don't know but this doesn't work for human beings cause human brains are assuming the dollar symbol has something to do with money or numbers but in PHP it's not. So you have to getting used to it.

It's really the same with the "dot" symbol in PHP. You wouldn't expect that it's concatenating strings.

Ruby as language is for me like reading a book. For example you can write code like this: if user.has_comments? ... end

That's why I love Ruby and I would prefer working with RoR for my project cause it helps you on rapid development.

One last thing: Ruby lets your focus on what you want to build without noise that's why (IMO) there are so much gems and a really huge community!

(Sorry for my bad english, it's not my primary language. I'm working on it :)

EDIT: corrected some typos.




Informative: I believe the term you are referring to is Sigil http://en.wikipedia.org/wiki/Sigil_(computer_programming)

I actually never found having the dollar sign as a sigil was any problem. There are a lot of punctuation symbols used in programming that are not used the same way as they are used in English grammar. In English, you don't create a new paragraph for every line indented in, the ^ sign is not often used for exclusive or, % is not used for modulus, and * is not used for multiplication.

You could also probably make a length function which returns strlen($str) if you really wanted to have $str->length.


I like the dollar prefix for variables. But each to their own.


I agree that PHP is a noisy language and I feel that it has a few sad inconsistencies with some of it's more common functions. Remembering parameter order in functions like in_array($needle, $haystack) is sometimes difficult as the choice they've made is arbitrary. I code in PHP everyday and have to look up functions every few days to remind myself of silly stuff like that.


not to be judgemental but it seems like you are new to programming and have a bias towards the new languages because its mainly all you have used.

PHP is based mainly off C-syntax and although the $ sign for variables is something new (and not an issue to me), the "dot" symbol is extremely familiar for those that have programmed in C/C++. It makes sense that a string would use "dot" (think of ...) for concatenation and an integer or numeric value would use "plus"+.

Your points are valid but I think the syntax behind PHP is great, maybe it could be better at OOP when calling to functions (as one person mentioned) but I am very happy with it.


FYI, your English looks rather good for someone who's learning it. The only real issue I saw is how you make almost every sentence into it's own paragraph.


Thank you for your tip. You are right my comment has to many paragraphs in it and they are often misplaced. I will try to improve that.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: