- showUser('Ignacio','Cortorreal');
- showUser(array('name'=>'Ignacio','last'=>'Cortorreal'));
The power of the New one is that parameters can be expressed in any order!! For example, if you want to add the middle name and a second last name to showUser() function, we can add it, and it won't bring problems to other code using that function, but its interface and implementation stars to become a mess, something that is somewhat reduced with the Old method.
DOS
- format /q/u/v/c/s
- g++ -Wall hello.cpp -o hello.bin
- type a.txt b.txt
- grep -v " OK "
- save({a:1,b:2,c:3});
- sum(1,2,3);
- /products/view/5/1
- /products/list/page:3/sort:desc/
- script.php?first=john&last=doe
- Horizontal Vs. Vertical Structures:
ID | First | Last |
---|---|---|
3 | Ignacio | Cortorreal |
--Vs--
ID | Field | Value |
---|---|---|
3 | First | Ignacio |
3 | Last | Cortorreal |
In lambda calculus, each function has exactly one parameter. The process to emulate multiple parameters is called currying. It looks crazy, but I think it is the way to go if we want to find a new order for these Parameters' disorder. Python supports this kind of paradigm, and is my next language to study after I achieve a basic-intermediate level of my C++ abilities. I was looking to Haskell or LISP, but Python's documentation on the web is way too much better.
This is the strongest Yin-Yang I have found in programming. Which one to choose?
What about ruby? It's gaining a lot of popularity lately.
ResponderEliminarIts community. I don't like how they market it. They are like politicians... only stating faults of others, instead of all their supposed own features. Also, Python has some flexibilities for general programming and it's recommended by the author of "The Cathedral and The Bazaar" and "Why Python?", but in terms of communities, I think PHP is the best!
ResponderEliminar