CommunityNews
Why we need multi-line short closures in PHP
PHP 8.1 is already taking shape quite well, yet there’s one feature I’d love to see added, that’s still being discussed: multi-line short closures. The RFC calls them “Auto-capturing multi-statement closures” but I hope you don’t mind me using the somewhat shorter name.
If you’re on an actively supported PHP version, you already know about short closures — a.k.a. “arrow functions”. And, most importantly, one of their biggest drawbacks: they only support one-line expressions, which are also used as the return value.
The multi-line short closures RFC by Nuno and Larry aims to solve that problem, in — what I think is — an elegant way.
Read in full here:
This thread was posted by one of our members via one of our news source trackers.
Popular Backend topics
Shayne gave this excellent talk the other day on Gleam, so I thought I’d share it.
From my point of view it was really interesting to se...
New
Apparently he decided to live-stream how he’s going to create a semver library.
New
Such inflammatory, much wow. Unfortunately, Haskell itself agrees.
Some languages naturally lend themselves towards adoption. Some don’t...
New
One of my favourite programming languages in the last few years has been Crystal. While the language has not yet reached its 1.0 version,...
New
I had a bit of a mini-adventure following Sobelow’s advice on adding a CSP to a Phoenix App. If you want to follow along, or want to add ...
New
In this post we’re going to be looking at a more advanced use of Gleam’s type system, known as phantom types. Hopefully by the end of thi...
New
Summary: I describe a simple interview problem (counting frequencies of unique words), solve it in various languages, and compare perform...
New
We take a deeper dive with Nathan Long into IOLists in Elixir. We cover what they are, how they work, the power they have when concatenat...
New
In episode 81 of Thinking Elixir, we talk with Digit and Quinn Wilton about the Burrito project. It wraps up Elixir to a single binary, e...
New
Jason Stiebs shows a couple ways for a LiveView to make it easy for users to click and copy an important value to their clipboard. He sho...
New
Other popular topics
Curious to know which languages and frameworks you’re all thinking about learning next :upside_down_face:
Perhaps if there’s enough peop...
New
Rust is an exciting new programming language combining the power of C with memory safety, fearless concurrency, and productivity boosters...
New
Continuing the discussion from Thinking about learning Crystal, let’s discuss - I was wondering which languages don’t GC - maybe we can c...
New
Hello everyone! This thread is to tell you about what authors from The Pragmatic Bookshelf are writing on Medium.
New
The File System Access API with Origin Private File System.
WebKit supports new API that makes it possible for web apps to create, open,...
New
If you want a quick and easy way to block any website on your Mac using Little Snitch simply…
File > New Rule:
And select Deny, O...
New
Author Spotlight:
VM Brasseur
@vmbrasseur
We have a treat for you today! We turn the spotlight onto Open Source as we sit down with V...
New
I have always used antique keyboards like Cherry MX 1800 or Cherry MX 8100 and almost always have modified the switches in some way, like...
New
Develop, deploy, and debug BEAM applications using BEAMOps: a new paradigm that focuses on scalability, fault tolerance, and owning each ...
New
Background
Lately I am in a quest to find a good quality TTS ai generation tool to run locally in order to create audio for some videos I...
New
Categories:
Sub Categories:
Popular Portals
- /elixir
- /rust
- /ruby
- /wasm
- /erlang
- /phoenix
- /keyboards
- /python
- /js
- /rails
- /security
- /go
- /swift
- /vim
- /clojure
- /emacs
- /haskell
- /java
- /svelte
- /onivim
- /typescript
- /kotlin
- /c-plus-plus
- /crystal
- /tailwind
- /react
- /gleam
- /ocaml
- /elm
- /flutter
- /vscode
- /ash
- /html
- /opensuse
- /centos
- /php
- /zig
- /deepseek
- /scala
- /sublime-text
- /textmate
- /lisp
- /react-native
- /nixos
- /debian
- /agda
- /kubuntu
- /arch-linux
- /deno
- /django
- /ubuntu
- /revery
- /nodejs
- /manjaro
- /spring
- /diversity
- /lua
- /julia
- /slackware
- /c







