Is writing a lot of functions in a program a good practice?
billionair 0
Newbie Poster
Recommended Answers
Jump to Postyes. For small programs like you might write in first year programming courses it doesn't really matter a whole lot, unless of course you are learning how to write functions. They become very important in larger programs to keep the functions small and understandable.
Jump to PostDoes the number of functions in a program affect performance?
It can. There's a certain measure of overhead in calling a function at runtime.
Is writing a lot of functions in a program a good practice?
Not if there's no reason for writing "a lot" of …
All 6 Replies
Ancient Dragon 5,243
Achieved Level 70 Team Colleague Featured Poster
deceptikon 1,790
Code Sniper Team Colleague Featured Poster
Bob 15
using namespace Bob Team Colleague
delta_frost 0
Newbie Poster
deceptikon 1,790
Code Sniper Team Colleague Featured Poster
rubberman 1,355
Nearly a Posting Virtuoso Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.