General Community > Chit Chat

Function VS. Class

(1/6) > >>

Saleh:
I am a php beginner :D ..
and I really want to know which is better to use ..
I found functions very easy to make and define while I still think Class and OO are difficult .. or maybe because I didn't try to write one yet ..
just look at my sig ... :P I wrote long ago but no one answered me .. so I decided to post this :)

so which one is better ? and which you prefer ?

Overseer:
Well from a non-php perspective (I spend my life doing C and C++ stuff).

Only when necessary ;)

KISS = Keep It Simple Stupid


Spaceman-Spiff:
course OO is a much better style. things are more structured and organized
but, there are some performance issues for using OO in PHP
OO should be much better in PHP 5 though

how big is the scale of project/script you're working on?

Saleh:

--- Quote from: Spaceman-Spiff on August 15, 2003, 11:24:55 AM ---how big is the scale of project/script you're working on?

--- End quote ---
I am not working at anything right now .. but I am asking for further working I may do ...

php 5 will take time before coming out to life ... and I read only a little about OO being better in php 5 .. something about Public and Private for vars inside classes ....
anyway .. what makes OO better ? I really want to know .. cause if it's really better I will start learning it harder ...

but wasn't YaBBSE concetrating on function method more then class ? and IIRC it didn't have any class nor OO ...

Zef Hemel:
If it's just a little script there's no use to really use objects, but pretty quickly it can really help development a lot. And I'm refering to OO programming here, which is not the same as simply using the 'class' keywork an awful lot as some people tend to think.

Navigation

[0] Message Index

[#] Next page

Go to full version