A list of 165 features found in programming languages.
title | pseudoExample | yes | no | percentage |
---|---|---|---|---|
Comments | # Hello PLDB | 637 | 5 | 99% |
Line Comments | # Hello PLDB | 533 | 27 | 95% |
Strings | "Hello PLDB" | 383 | 0 | 100% |
Print() Debugging | print "Hello PLDB" | 334 | 1 | 100% |
MultiLine Comments | /* Hello PLDB */ | 233 | 22 | 91% |
Integers | 80766866 | 171 | 1 | 99% |
Floats | 80766866.0 | 145 | 0 | 100% |
Booleans | pldb = true | 129 | 4 | 97% |
Hexadecimals | 0x4D06792 | 112 | 1 | 99% |
Conditionals | if (isTrue) printPldb() | 81 | 10 | - |
Semantic Indentation | line0 if true line1 print "Hello PLDB" | 65 | 536 | 11% |
Assignment | name = "PLDB" | 62 | 1 | - |
While Loops | while (pldb.pop()) loop() | 58 | 2 | - |
Octals | 0o464063622 | 57 | 1 | - |
Binary Literals | 0b100110100000110011110010010 | 53 | 1 | - |
File Imports | import pldb | 49 | 9 | - |
Functions | function computePLDBRanks() {} | 44 | 1 | - |
Operator Overloading | def __add__(): doSomethingDifferent() | 34 | 20 | - |
Classes | class PLDBFile {} | 33 | 7 | - |
Switch Statements | switch animal: case dog-buy; case cat-sell; | 32 | 1 | - |
Macros | #define pldbItems 4000 | 32 | 21 | - |
Constants | const name = "PLDB" | 31 | 1 | - |
Case Sensitivity | pldb != PLDB | 30 | 10 | - |
Type Inference | imAString = "pldb" | 29 | 0 | - |
Directives | use strict; | 27 | 2 | - |
Pointers | int *pldb | 26 | 10 | - |
Lists | [2, 3, 10] | 26 | 1 | - |
Exceptions | throw new Error("PLDB uh oh") | 26 | 5 | - |
Scientific Notation | 8076686.6e1 | 24 | 0 | - |
Case Insensitive Identifiers | pLdB = "PLDB" | 24 | 72 | - |
Inheritance | class PLDBFile extends File | 21 | 1 | - |
Access Modifiers | class PLDBFile { public title } | 21 | 6 | - |
Garbage Collection | var iDontNeedToFreeThis | 20 | 12 | - |
Constructors | PLDBFile { constructor() {} } | 20 | 5 | - |
Zero-based numbering | firstItem = pldb[0] | 17 | 3 | - |
Bitwise Operators | 3 == (2 | 1) | 17 | 1 | - |
Increment and decrement operators | i++ | 16 | 2 | - |
Single Dispatch | person.run() | 15 | 1 | - |
Multiple Inheritance | extends parentWhichExtendsSomethingElse | 15 | 9 | - |
Ternary operators | true ? 1 : 0 | 14 | 14 | - |
Lispy | (+ 1 2) | 13 | 1 | - |
Threads | thread1(); thread2(); | 13 | 0 | - |
Multiline Strings | hello = """Hello\nPLDB""" | 13 | 7 | - |
Enums | colorsEnum { "red", "white", "blue"} | 13 | 6 | - |
Message Passing | "get pldb" | 12 | 1 | - |
Maps | {name: "PLDB"} | 12 | 0 | - |
Type Casting | (float)pldbRank; | 12 | 0 | - |
Variadic Functions | args.map(doSomething) | 11 | 0 | - |
Structs | struct pldbFile { int rank; char *title; }; | 11 | 0 | - |
Assert Statements | assert(isTrue) | 11 | 1 | - |
Static Typing | int pldbRank = 100 | 10 | 0 | - |
Regular Expression Syntax Sugar | /pldb/ | 10 | 11 | - |
Module Pattern | module PLDB {} | 10 | 0 | - |
Manual Memory Management | malloc(4); | 10 | 0 | - |
Iterators | for lang in pldb() | 10 | 1 | - |
Interfaces | interface PLDBFile | 10 | 1 | - |
Symbol Tables | SymbolName|Type|Scope;bar|function,double|extern | 9 | 0 | - |
Namespaces | namespace PLDB {} | 9 | 4 | - |
Generics | function identity<T>(arg: T): T | 9 | 1 | - |
Function Composition | o = (f, g) => x => f(g(x)) | 9 | 1 | - |
Polymorphism | a + "b"; 1 + 2 | 8 | 1 | - |
Partial Application | add5 = num => addNumbers(10, num) | 8 | 0 | - |
Mixins | extends pldbFile, diskFile | 8 | 0 | - |
Infix Notation | 1 + 2 | 8 | 0 | - |
Here Document | `A big multliline text block` | 8 | 1 | - |
Gotos | goto 10 | 8 | 4 | - |
Fixed Point Numbers | 80766866.00 | 8 | 7 | - |
Pattern Matching | fib 0 = 1; fib 1 = 1 | 7 | 1 | - |
Homoiconicity | (list ()) | 7 | 1 | - |
Generators | yield 2 | 7 | 0 | - |
Characters | char character = 'P'; | 7 | 0 | - |
Async Await | async downloadPldb => await getFiles() | 7 | 3 | - |
Anonymous Functions | () => printPldb() | 7 | 0 | - |
Function Overloading | add(string: str, string2: str) | 6 | 6 | - |
Expressions | (1 + 2) | 6 | 0 | - |
Destructuring | {title, rank} = pldbFile | 6 | 0 | - |
Default Parameters Pattern | say(message = "Hello PLDB") | 6 | 0 | - |
Disk Output | write("pldb.csv", "...") | 6 | 11 | - |
Shebang | #! /run | 6 | 0 | - |
Units of Measure | 42cm | 5 | 5 | - |
Union Types | any = string | number | 5 | 0 | - |
Templates | template TCopy(T) {} | 5 | 4 | - |
Methods | pldbFile.downloadWebsite() | 5 | 0 | - |
hasForEachLoops | 5 | 0 | - | |
Dynamic Properties | pldb.score = 50 | 5 | 1 | - |
Merges Whitespace | result = 1 + 2 | 4 | 0 | - |
Letter-first Identifiers | pldb100 = "OK" // 100pldb = "ERROR" | 4 | 0 | - |
Typed Holes | 2 + _ => 2 + [int|float] | 4 | 0 | - |
Statements | print "Hello PLDB" | 4 | 0 | - |
Single-Type Arrays | const pldbRanks: int[] | 4 | 0 | - |
Sets | {"pldb", "PLDB"} | 4 | 1 | - |
References | fn(objPointer) | 4 | 0 | - |
Range Operator | 1 ... 10 | 4 | 0 | - |
Pipes | ls pldb | wc | 4 | 1 | - |
Multiple Dispatch | collide_with(x::Spaceship, y::Spaceship) | 4 | 4 | - |
Map Functions | pldbFiles.map(downloadFilesFn) | 4 | 0 | - |
Magic Getters and Setters | get(name) => obj[name] | 4 | 3 | - |
Implicit Type Casting | console.log("hello " + 2) | 4 | 0 | - |
hasForLoops | 4 | 0 | - | |
First-Class Functions | [2.1].map(Math.round) | 4 | 0 | - |
Duck Typing | length() // makes me an iterator | 4 | 1 | - |
Doc comments | // param1: A comment about the first param | 4 | 0 | - |
Dependent types | pldbSortedList // a list where is sorted is true | 4 | 1 | - |
Binary Operators | 1 + 1 | 4 | 0 | - |
Breakpoints | debugger; | 3 | 0 | - |
Unicode Identifers | 未 = 0.00001 | 3 | 1 | - |
Unary Operators | count++ | 3 | 0 | - |
Streams | echo 123 | 123.txt | 3 | 0 | - |
Source Maps | {file: 'pldb.min.js',sources: ['pldb.js'], mappings: 'CAAC,IAAI,IAAM'} | 3 | 0 | - |
Prefix Notation | + 1 2 | 3 | 0 | - |
Postfix Notation | 2 3 4 + 2 - | 3 | 0 | - |
Null | uhOh = null | 3 | 0 | - |
Method Chaining | pldbFile.toString().length | 3 | 0 | - |
Lazy Evaluation | print(range(1000000)[2]) | 3 | 0 | - |
hasDynamicTyping | 3 | 0 | - | |
Dispose Blocks Pattern | with pldb: do computeRanks() | 3 | 1 | - |
hasContinue | 3 | 0 | - | |
hasBreak | 3 | 0 | - | |
Algebraic Data Type | garageContents = empty | vehicle | 3 | 0 | - |
Virtual function | virtual FetchPLDBFile(); | 2 | 0 | - |
Variable Substitution Syntax | name = "PLDB"; print $name | 2 | 20 | - |
Type Parameters | function identity<T>(arg: T): T {return arg} | 2 | 0 | - |
Type Annotations | score: number | 2 | 0 | - |
Traits | use redBorder | 2 | 0 | - |
hasSymbols | 2 | 0 | - | |
Static Methods | static downloadPldb() {} | 2 | 0 | - |
Runtime Guards | f x | x > 0 = 1 | otherwise = 0 | 2 | 0 | - |
hasReservedWords | 2 | 1 | - | |
hasLabels | 2 | 0 | - | |
hasIfs | 2 | 0 | - | |
hasIfElses | 2 | 0 | - | |
hasEscapeCharacters | 2 | 0 | - | |
hasDecimals | 2 | 0 | - | |
hasBoundedCheckedArrays | 2 | 0 | - | |
hasArraySlicingSyntax | 2 | 0 | - | |
Abstract Types | abstract class PLDBFile {} | 2 | 2 | - |
Zippers | pldbCursor.moveLeft() | 1 | 0 | - |
hasVoidFunctions | 1 | 0 | - | |
hasValueReturnedFunctions | 1 | 0 | - | |
hasUserDefinedOperators | 1 | 2 | - | |
hasTryCatch | 1 | 1 | - | |
Triples | Javascript isListedIn PLDB | 1 | 0 | - |
hasTimestamps | 1 | 0 | - | |
hasStringConcatOperator | 1 | 0 | - | |
hasStatementTerminatorCharacter | 1 | 0 | - | |
hasSelfOrThisWord | 1 | 0 | - | |
hasSExpressions | 1 | 1 | - | |
hasRequiredMainFunction | 1 | 0 | - | |
Refinement Types | evenInt where int % 2 = 0 | 1 | 0 | - |
Processor Registers | eax 2 | 1 | 3 | - |
Pairs | (pl . db) | 1 | 0 | - |
Monad | g >>= f | 1 | 0 | - |
hasMemberVariables | 1 | 0 | - | |
Implicit Arguments | shout(implicit message: string) | 1 | 0 | - |
hasIds | 1 | 0 | - | |
hasGlobalScope | 1 | 0 | - | |
hasFnArguments | 1 | 0 | - | |
hasExports | 1 | 0 | - | |
hasDynamicSizedArrays | 1 | 0 | - | |
hasClobs | 1 | 0 | - | |
hasBuiltInRegex | 1 | 2 | - | |
hasBlobs | 1 | 1 | - | |
canUseQuestionMarksAsPartOfIdentifier | 1 | 1 | - | |
canReadCommandLineArgs | 1 | 0 | - | |
hasMethodOverloading | 0 | 1 | - |