Devographics / StateOfJS-2020

Other
103 stars 20 forks source link

"Missing from JS" results says JS is missing "functions" #51

Closed dfabulich closed 2 years ago

dfabulich commented 2 years ago

According to https://2020.stateofjs.com/en-US/opinions/#missing_from_js the 5th most popular answer to the "What do you feel is currently missing from JavaScript?" question is, "functions"

… that can't be right, can it??

When I view the raw data, the bucket for "functions" looks buggy:

{
    "id": "functions",
    "count": 154,
    "percentage": 8.2,
    "entity": {
    "id": null,
    "homepage": null,
    "name": null
    }
},

Unlike all the other buckets, "functions" has null id and no name. I think something bad has happened to the data here.

dfabulich commented 2 years ago

Reviewing the data from https://share.getcloudapp.com/X6ub4eeo I find that the functions bucket was defined using the regex /functions?/i which I claim isn't a meaningful result.

List of raw responses that match the regexp * `"static types, global type inference, custom operators (or at least function composition, application and their reversed variants)"` * `"Functional programming"` * `"More functional programming features "` * `"Functional Programming"` * `"Simplicity. Changes to the language that make new things possible instead of quirky relabeling (var --> let, function() --> () => etc.)"` * `"More functional programming features. A Type system."` * `"Custom operators\nFunction composition"` * `"Temporal API, Functional |> lens, #['set']"` * `"more functional API, Temporal API"` * `"Functional programming paradigm "` * `"Pipeline operator \nPattern Matching \nImmutable Data Structures\nMore functional programming stuff "` * `"Real functional features like pattern matching"` * `"functional fn calls chain |"` * `"Functional-oriented features"` * `"Better support for functional programming"` * `"Extension functions"` * `"More cross functional Bluetooth and IoT web APIs for more inter device applications. Payments made easy with web APIs in a generic way."` * `"Better functional programming support"` * `"Functional programming stuff"` * `"Pattern matching functions"` * `"Better aggregate functions."` * `"More functional features "` * `"import maps, list comprehension, sleep function, types"` * `"1. strict functional programming mode\n2. Native Data-Binding support in Browsers"` * `"More functional programming approach"` * `"more features for easing functional programming: tail call optimizations, pipe operator, currying"` * `"Matchers, 1st class Functional Programming support, Either Left Right etc."` * `"Proper type safety (Typescript becoming the default). Better compiler optimizations for functional code that uses map and reduce"` * `"More functional languages"` * `"Missing a lot of helpful functions about functional programming"` * `"A solid collection of standard libraries\nDate functionality"` * `"function decorator, basic types support (like TS)"` * `"Function overload"` * `"Functional programming (options and pattern matching)"` * `"Type extensions, algebraic data types, composable functions/result builders"` * `"A bigger support for a strictly typed functional language like reason or elm"` * `"extension functions "` * `"Multi-threading, more functional programming utilities"` * `"Types, Functional Programming"` * `"Something like Linq,OOP stuff, Function overloads"` * `"More functional programming friendly syntax"` * `"Better typing and functional paradigms. JS has OOP but I'd like more functional approaches. Rust has been really good about that."` * `"functional programming and immutability as first-class paradigms"` * `"More functional programming sugar like how we got class sugar.\nImmutable versions of everything. Built-in deep freeze. flow/compose."` * `"webassembly not being able to call DOM functions"` * `"Function composition syntax, e.g. f*g(...args) instead of f(g(...args))"` * `"Function Programming"` * `"Functional features such as pipelines, algebraic data structures, etc"` * `"Better functional programming support (pipeline operator, do-expressions). Native observables. Standard libraries. Jupyter notebook equivalent"` * `"Even stronger functional programming tools."` * `"some simple sort of object type safety. Think Joi but simple. So it's easier to validate function input"` * `"Being able to pass element to the function as a new object in memory, rather than reference. It would make manipulating objects so much easier!"` * `"Not in js, but in typescript I would love to see a way to enforce pure functions."` * `"immutable data structures\npattern matching\nmore reflective functionalities\nstandard library\necosystem"` * `"more built-in string functions, without regex'in it every time"` * `"Pattern matching, functional composition (much like elixir)"` * `"Types, Function signatures and less verbosity. I hate code with brackets everywhere"` * `"more functional\n"` * `"Static typing, functional programming"` * `"Function composition"` * `"function composition operator\nlift operator"` * `"- pipeline function\n- stream api like java for collection"` * `"Not having to bind this or resort to arrow functions (can break backwards compatibility). Actual classes. Better static analysis."` * `"Functional programming features"` * `"Better support for native functional programming paradigms (i.e. tail recursion, guards, etc)"` * `"More options for functional programming, pipeline operator, optional binding (e.g. if let), pattern matching, function bind operator"` * `"More built in functional programming types and helpers. "` * `"Utility functions like what exist in lodash/underscore."` * `"Pipelines! or other ways to make function composition cleaner, e.g. some way to access a dot method of a parameter without wrapping it in a function"` * `"value equality tests rather than just reference equality\nmore functional forms, such as syntactic composition"` * `"inverse conditionals. runFunction() if (x === \"Bob\");"` * `"pattern matching for functional javascript"` * `"Larger emphasis on functional programming and typing, deemphasizing OO-concepts and the class syntax and sugar."` * `"The pipe operator and automatic currying of functions. "` * `"Standard library, deeper functional programming support, type system"` * `"Better built-in date functions."` * `"More Functional Programming features."` * `"Function pipe operator. Function composition operator. Error on awaiting something that is not a promise."` * `"Named function parameters first class to the language(I know about objects with object deconstruction)."` * `"Opt-in typescript-style static typing. Private properties/functions of objects."` * `"Understanding the functional paradigms it poorly mimics from time to time."` * `"Functional web components"` * `"some Backend (not security-compromising) functions in the frontend"` * `"more functional syntax"` * `"Lodash functions should be built-in"` * `"weak references / pure function constraint"` * `"Functional programming focus, better web api"` * `"Quick and easy server side functionality like PHP has mail(), for example."` * `"More Functional concepts,\nAsync await was a misstake"` * `"better support partial function application, proper immutability, the \"pipe\" operator, standardized \"contenteditable\" related apis"` * `"Enforcement of better coding practices. Stronger means to achieve functional programming."` * `"Types, Functional Programming"` * `"better native date functionality to remove the need for dayjs/date-fns etc"` * `"Functional programming as first-class citizen"` * `"Ruby-like implicit returns from last line of function"` * `"decorators, pipe operator, pure functions, pattern matching, nominal types"` * `"Pattern matching, function composition"` * `"Modern syntax\nFunctional\nMore stage 1 proposals enter the standard"` * `"pipeline operator, function composition"` * `"Move towards more FP features like pipeline operator, curried functions etc is slow. "` * `"Array map, reduce, filter, some, every methods in async functions use. Sequental and parallel runs are needed."` * `"better functional syntax"` * `"Features to aid functional programming: pipe operator, more comprehensive built-in functions, currying, etc."` * `"Become fully functional and remove object orientation. Replace JSON with a proper data structure (EDN? XML?). "` * `"Functional programming features (pipelines, partial app, pattern matching and other similar proposals), some sort of namespace feature maybe?"` * `"A simple way to set (non-function) prototype properties within the body of a class definition."` * `"pattern matching, pipe operator, more functional concepts in general."` * `"MORE FUNCTIONAL PROGRAMMING A.K.A PATTERN MATCHING"` * `"A more functional approach overall: a standard way to define types, pipe and compose operators (that would be great, frankly), etc"` * `"Support for decimals, Immutability and enabling pure functional programming."` * `"more native functions and less frameworks"` * `"More functional approach. Incorporate what frameworks are developing on top of it."` * `"More type support and functional utilities in regular JS. "` * `"Easy functional style. Easy to use immutable types. "` * `"More built in utility functions (like lodash)"` * `"Functional programming features like piping"` * `"A stronger type system than TypeScript, more functional programming features"` * `"Native functionality support like rust, go"` * `"More functional features"` * `"Opinionated full stack JavaScript framework like Rails that doesn’t just use serverless functions"` * `"Arrow functions (which is coming!!!)"` * `"built-in static typing, function decorators, built-in modules (some kind of standard lib)"` * `"Something similar to React portal functionality."` * `"More functional features, better native typing, browser-side typescript support, better file-system API (maybe a v2)"` * `"Course work for transitioning people from OOP to functional programming. Stop adding OOP syntax."` * `"A stronger embrace of functional programming including a pipe operator and more functional-type functions included in the standard (ex. zip)."` * `"Better standard library (Object/array -> lodash like / date -> moment/date-fns / promise -> some bluebird functions)"` * `"Proper implementation of tail call optimization for recursive functions on all browsers and Node"` * `"Concurrent, more functional approach, strict types "` * `"memoised functions, throttled functions, debounced functions"` * `"More libraries that are not object oriented. Just give me an API with functions I can call from a central object."` * `"Give it a pure functional/immutable mode, like the use strict, mode, bit way more strict"` * `"Basic functions included in other languages."` * `"Expression switches (aka function switches or pattern matching); first-class support for complex (real + imaginary) numbers"` * `"More functional stuff, less class OO stuff."` * `"Observables, functional programming primitives, Date/Time handling libraries"` * `"More functional programming stuff."` * `"To become more functional/inmutable"` * `"Optional arguments in functions like Python. "` * `"more support for native functional programming"` * `"More functional programming support from language and community. I would be happy to see more projects like fp-ts, fluture, and Sanctuary."` * `"function currying"` * `"Private functions"` * `"good date functions, better and more uniform browser support"` * `"Better class / OOP functionality, more compile-time functionality ( for intellisense purposes and refactoring)"` * `"functional language features && typing"` * `"More functional programming constructs like pipe operator, native monads, ..."` * `"Pipeline operator (and perhaps even native function composition!)"` * `"More builtin data-structures and a few lodash functions for native use."` * `"Better functional programming primitives"` * `"First class pattern matching, partial function application and array slice support"` * `"More functional programming features. Endorsement of widely adopted 3rd party tools like TypeScript or Webpack"` * `"decorators, functional programming"` * `"type system, built in immutability, proper functional programming paradigms (ML style)`

All of these were counted as functions responses.

Instead, I suggest that the regexp should be /functional\b/i and that the resulting bucket should be titled "Functional programming". This matches 86 of the 154 functions entries. The other 68 entries don't really have much in common.

SachaG commented 2 years ago

Like I said on Discord I now remember that this happened because the list of regexp used to normalize the "what's missing from CSS" question was mistakenly expanded to normalize the "what's missing from JS" question without considering how the existing CSS regexps would affect the JS results.

I'll fix it by establishing two separate lists for that section of the normalization rules.