Code Monkey home page Code Monkey logo

idiomlist's Introduction

An Incomplete List of Programming Idioms

One of the great joys of programming is exploring different approaches to problem solving. From domain-specific algorithms to more general concepts and design patterns. Programming languages follow different paradigms (see this list) and are usually implemented independent of one another. Although many languages share common syntactic traits amongst themselves, their architecture, implementation and intent of use may vary vastly. Consequently, each language naturally evolves best practices for developers to use - whether driven by philosophy, constraints and/or strong community influence.

This repository gathers resources to get a quick overview of idioms in different programming languages.

But, what is an idiom?

"A programming idiom is a means of expressing a recurring construct in one or more programming languages. Generally speaking, a programming idiom is an expression of a simple task, algorithm, or data structure that is not a built-in feature in the programming language being used, or, conversely, the use of an unusual or notable feature that is built into a programming language." Source

or as Mr. Joel Kemp describes in a more practical context:

"...I only knew C++. I used it for schoolwork and to build games. I (embarrassingly in hindsight) thought it was the only language worth knowing. Then I was forced to learn Java, coded in Visual Basic for a Summer gig, built an app and game with C#, and dabbled in some web languages like PHP. While it was great to learn new languages, I coded every single one like C++. This was not programming idiomatically. This is a common mistake amongst programmers (across all skill levels really)..." Source

Idioms vs design patterns

StackExchange discussion on idioms versus design patterns here.

Further reasoning:

What's the difference between an idiom and a pattern? I have a hypothesis that:

  • idioms are smaller
  • idioms are language-specific

Source

Idioms in various languages

Python

List of Python programming idioms

Various idioms

Javascript

Various idioms

idiomlist's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.