Skip to main content

why Why empty function are needed

I started learning pythonPython and I am wondering why empty function are needed in a programming language.

e.g. in python:

def empty_func():
    pass

evenEven in shell scripts empty function empty functions are available.

My Understandings and question:

  1. Why do programming language neededlanguages need empty functions? Is it for just playing around with programming language or nothing else that really matters?

  2. If this has a purpose, can anyone describe the use case or give a real example of the usage of empty functions?

  3. Or is there any tradition of programming languages allowing empty functions?


**EDIT (Things I got from reading your answers) :**

EDIT (Things I got from reading your answers):

  • For Sketching Algorithms or with Abstract Functions
  • For Submitting forms with no action needs to be performed
  • Placeholder for some mandatory operations

why empty function are needed

I started learning python and I am wondering why empty function are needed in a programming language

e.g. in python:

def empty_func():
    pass

even in shell scripts empty function empty functions are available.

My Understandings and question:

  1. Why do programming language needed empty functions? Is it for just playing around with programming language or nothing else that really matters?

  2. If this has a purpose, can anyone describe the use case or give a real example of the usage of empty functions?

  3. Or is there any tradition of programming languages allowing empty functions?


**EDIT (Things I got from reading your answers) :**
  • For Sketching Algorithms or with Abstract Functions
  • For Submitting forms with no action needs to be performed
  • Placeholder for some mandatory operations

Why empty function are needed

I started learning Python and I am wondering why empty function are needed in a programming language.

e.g. in python:

def empty_func():
    pass

Even in shell scripts empty functions are available.

My Understandings and question:

  1. Why do programming languages need empty functions? Is it for just playing around with programming language or nothing else that really matters?

  2. If this has a purpose, can anyone describe the use case or give a real example of the usage of empty functions?

  3. Or is there any tradition of programming languages allowing empty functions?

EDIT (Things I got from reading your answers):

  • For Sketching Algorithms or with Abstract Functions
  • For Submitting forms with no action needs to be performed
  • Placeholder for some mandatory operations
replaced http://programmers.stackexchange.com/ with https://softwareengineering.stackexchange.com/
Source Link

I started learning python and I am wondering why empty function are needed in a programming language

e.g. in python:

def empty_func():
    pass

even in shell scripts empty function empty functions are available.

My Understandings and question:

  1. Why do programming language needed empty functions? Is it for just playing around with programming language or nothing else that really matters?

  2. If this has a purpose, can anyone describe the use case or give a real example of the usage of empty functions?

  3. Or is there any tradition of programming languages allowing empty functions?


**EDIT (Things I got from reading your answers) :**

I started learning python and I am wondering why empty function are needed in a programming language

e.g. in python:

def empty_func():
    pass

even in shell scripts empty function empty functions are available.

My Understandings and question:

  1. Why do programming language needed empty functions? Is it for just playing around with programming language or nothing else that really matters?

  2. If this has a purpose, can anyone describe the use case or give a real example of the usage of empty functions?

  3. Or is there any tradition of programming languages allowing empty functions?


**EDIT (Things I got from reading your answers) :**
  • For Sketching Algorithms or with Abstract Functions
  • For Submitting forms with no action needs to be performed
  • Placeholder for some mandatory operations

I started learning python and I am wondering why empty function are needed in a programming language

e.g. in python:

def empty_func():
    pass

even in shell scripts empty function empty functions are available.

My Understandings and question:

  1. Why do programming language needed empty functions? Is it for just playing around with programming language or nothing else that really matters?

  2. If this has a purpose, can anyone describe the use case or give a real example of the usage of empty functions?

  3. Or is there any tradition of programming languages allowing empty functions?


**EDIT (Things I got from reading your answers) :**
  • For Sketching Algorithms or with Abstract Functions
  • For Submitting forms with no action needs to be performed
  • Placeholder for some mandatory operations
Question Protected by gnat
explaining points i got from reading answers
Source Link
jeyanthinath
  • 215
  • 1
  • 2
  • 6

I started learning python and I am wondering why empty function are needed in a programming language

e.g. in python:

def empty_func():
    pass

even in shell scripts empty function empty functions are available.

My Understandings and question:

  1. Why do programming language needed empty functions? Is it for just playing around with programming language or nothing else that really matters?

  2. If this has a purpose, can anyone describe the use case or give a real example of the usage of empty functions?

  3. Or is there any tradition of programming languages allowing empty functions?


**EDIT (Things I got from reading your answers) :**
  • For Sketching Algorithms or with Abstract Functions
  • For Submitting forms with no action needs to be performed
  • Placeholder for some mandatory operations

I started learning python and I am wondering why empty function are needed in a programming language

e.g. in python:

def empty_func():
    pass

even in shell scripts empty function empty functions are available.

My Understandings and question:

  1. Why do programming language needed empty functions? Is it for just playing around with programming language or nothing else that really matters?

  2. If this has a purpose, can anyone describe the use case or give a real example of the usage of empty functions?

  3. Or is there any tradition of programming languages allowing empty functions?

I started learning python and I am wondering why empty function are needed in a programming language

e.g. in python:

def empty_func():
    pass

even in shell scripts empty function empty functions are available.

My Understandings and question:

  1. Why do programming language needed empty functions? Is it for just playing around with programming language or nothing else that really matters?

  2. If this has a purpose, can anyone describe the use case or give a real example of the usage of empty functions?

  3. Or is there any tradition of programming languages allowing empty functions?


**EDIT (Things I got from reading your answers) :**
  • For Sketching Algorithms or with Abstract Functions
  • For Submitting forms with no action needs to be performed
  • Placeholder for some mandatory operations
Tweeted twitter.com/#!/StackProgrammer/status/558814193684869121
Edited for grammar
Source Link
user53141
user53141
Loading
Source Link
jeyanthinath
  • 215
  • 1
  • 2
  • 6
Loading