Talking about implementation similarities, you're true.
PHP has almost nothing related to Java.

As an example, I'll show you how to concatenate an array using a
separator in PHP and Java:

PHP:
$myArray = array(1, 2, 3, 4, 5);
$myString = implode(', ', $myArray);
echo $myString; // prints: 1, 2, 3, 4, 5

Java:
int[] myArray = {1, 2, 3, 4, 5};
String myString = "";

for (int i = 0; i < myArray.length; i++) {
    if (i!=0) { out += ', '; }
    myString += myArray[i].toString();
}

System.out.print(myString); // prints: 1, 2, 3, 4, 5


But as I said... someone that has some knowledg in
structured/object-oriented languages is able to read it and knows
better than CF what's going on.
The similarities are smoother, you're able to read a Java code if you
know PHP, aswell as C# if you know Java... but it's a bit hard to read
a Java code if you only know CF.


Cheers,

On Wed, Aug 20, 2008 at 4:29 PM, Howard Fore <[EMAIL PROTECTED]> wrote:
>
> On Wed, Aug 20, 2008 at 3:19 PM, Guilherme Blanco
> <[EMAIL PROTECTED]> wrote:
>>
>> Pay attention to the way you write your software and you notice what
>> am I meaning...
>> Notice to syntax, it's the main reason I said that.
>
> You left out cfscript for cf:
>
> message = "Hello world!";
>
> and
>
> if (message eq "Hi!")
> {
>   // Do stuff
> }
>
>
>>
>> Which ones are more similar to the rest... PHP or CF?
>> Of course there're MANY differences between one language and other...
>> and if you ask me which one is more similar to Java? C#.
>>
>> So, I'm not telling PHP is like Java or C# or even C. I'm telling you
>> that the learn path (syntax has less impacts) is minimized if he
>> decides to learn PHP instead of CF.
>
> Interesting. My experience has been that the syntax differences are really a
> minor part of learning a new language. Certainly the most obvious
> difference, but the smallest in terms of real mastery and hurdles to
> overcome. Each language has it's own nuances and particular ways of handling
> the same concepts. In this way, PHP (and CF) is verrrrrrry different than
> Java or C.
>
> --
> Howard Fore, [EMAIL PROTECTED]
> "The universe tends toward maximum irony. Don't push it." - Jeff Atwood
> 



-- 
Guilherme Blanco - Web Developer
CBC - Certified Bindows Consultant
Cell Phone: +55 (16) 9166-6902
MSN: [EMAIL PROTECTED]
URL: http://blog.bisna.com
Rio de Janeiro - RJ/Brazil

Reply via email to