{"id":19011886,"url":"https://github.com/surjoyday/functional-procedural-objectoriented-programming","last_synced_at":"2025-02-21T15:46:23.925Z","repository":{"id":255579799,"uuid":"852449535","full_name":"Surjoyday/Functional-Procedural-ObjectOriented-Programming","owner":"Surjoyday","description":"Code examples illustrating different programming paradigms: Object-Oriented Programming (OOP), Procedural Programming (PP), and Functional Programming (FP). ","archived":false,"fork":false,"pushed_at":"2024-09-04T21:48:07.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-01T21:47:08.309Z","etag":null,"topics":["functional-programming","javascript","oop","paradigms-of-programming","procedural-programming"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Surjoyday.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-04T20:31:31.000Z","updated_at":"2024-09-04T21:48:11.000Z","dependencies_parsed_at":"2024-09-06T05:31:13.445Z","dependency_job_id":"f5ec779f-6724-4b61-a7b6-c439f07e0d9d","html_url":"https://github.com/Surjoyday/Functional-Procedural-ObjectOriented-Programming","commit_stats":null,"previous_names":["surjoyday/functional-procedural-objectoriented-programming"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Surjoyday%2FFunctional-Procedural-ObjectOriented-Programming","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Surjoyday%2FFunctional-Procedural-ObjectOriented-Programming/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Surjoyday%2FFunctional-Procedural-ObjectOriented-Programming/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Surjoyday%2FFunctional-Procedural-ObjectOriented-Programming/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Surjoyday","download_url":"https://codeload.github.com/Surjoyday/Functional-Procedural-ObjectOriented-Programming/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240043080,"owners_count":19739014,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["functional-programming","javascript","oop","paradigms-of-programming","procedural-programming"],"created_at":"2024-11-08T19:16:03.707Z","updated_at":"2025-02-21T15:46:23.666Z","avatar_url":"https://github.com/Surjoyday.png","language":"JavaScript","readme":"### Object-Oriented Programming (OOP)\n\n- **Grouping**: Data and related functions (methods) are bundled together inside objects.\n- **Purpose**: Objects model real-world entities and encapsulate data and behavior, allowing for modular and reusable code.\n- **Example**: A `Car` object might have properties like `color` and `speed`, and methods like `accelerate()` and `brake()`.\n\n### Procedural Programming (PP)\n\n- **Grouping**: Functions and data are separate. Functions operate on data that is often passed to them or accessed from outside the functions.\n- **Purpose**: Focuses on sequences of procedures or steps to process data, emphasizing control flow and task execution.\n- **Data Access**: Functions can access and modify global or external data, in addition to the data passed as arguments.\n- **Example**: A function like `calculateSpeed(distance, time)` operates on data passed as arguments but may also use or modify global variables.\n\n### Functional Programming (FP)\n\n- **Grouping**: Functions operate on data, and the focus is on using pure functions that transform data without modifying the original. Code is organized around the use of functions.\n- **Purpose**: Emphasizes immutability and function composition, aiming for predictable and side-effect-free operations.\n- **Data Access**: Functions should only use data passed directly as arguments and avoid accessing or modifying external/global data to ensure purity.\n- **Example**: A function like `doubleNumbers(numbers)` takes a list of numbers as an argument and returns a new list with each number doubled, without altering the original list.\n\n### Summary\n\n- **OOP**: Bundles data and methods inside objects.\n- **PP**: Separates functions and data, with functions that can access and modify both passed arguments and external/global data.\n- **FP**: Organizes code around pure functions that operate on data passed directly to them, emphasizing immutability and avoiding external/global data access.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsurjoyday%2Ffunctional-procedural-objectoriented-programming","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsurjoyday%2Ffunctional-procedural-objectoriented-programming","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsurjoyday%2Ffunctional-procedural-objectoriented-programming/lists"}