
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

In a previous post we talked about implementing a simple video chat with WebRTC and Elixir. This update will touch on some of the API cha...
New

What’s Next for Teal, the typed dialect of Lua - FOSDEM 2021.
This is my talk about the latest updates on the Teal programming language,...
New

Everyone outside of tech has heard of JavaScript, Java, Python, Ruby and even .Net, but few if any have heard of F#. However, F# may be o...
New

Today we’ll just talk about integer casting, but Zig also provides explicit casting support for floats, bools, enums, pointers, and more....
New

Episode 299 - 10 Tips and Tricks.
I don’t get around to doing these too often, but they are always a lot of fun. In this episode, we’ll ...
New

When DoorDash approached the limits of what our Django-based monolithic codebase could support, we needed to design a new stack that woul...
New

There is a new community resource available on writing “Safe Ecto Migrations”. When we get a migration wrong, it can lock up your product...
New

Mark Hoffman, the author of Programming WebAssembly in Rust, is a pretty hilarious lecturer if you like a dry sense of humor.
New

Hi everyone :wave: I’m excited to share an article detailing how we have reorganized our Elixir/Phoenix project’s directory structure.
W...
New
Other popular topics

Reading something? Working on something? Planning something? Changing jobs even!?
If you’re up for sharing, please let us know what you’...
New

We have a thread about the keyboards we have, but what about nice keyboards we come across that we want? If you have seen any that look n...
New

I’ve been hearing quite a lot of comments relating to the sound of a keyboard, with one of the most desirable of these called ‘thock’, he...
New

Rust is an exciting new programming language combining the power of C with memory safety, fearless concurrency, and productivity boosters...
New

I have seen the keycaps I want - they are due for a group-buy this week but won’t be delivered until October next year!!! :rofl:
The Ser...
New

“A Mystical Experience” Hero’s Journey with Paolo Perrotta @nusco
Ever wonder how authoring books compares to writing articles?...
New

This is going to be a long an frequently posted thread.
While talking to a friend of mine who has taken data structure and algorithm cou...
New

Rails 7 completely redefines what it means to produce fantastic user experiences and provides a way to achieve all the benefits of single...
New

Author Spotlight
Mike Riley
@mriley
This month, we turn the spotlight on Mike Riley, author of Portable Python Projects. Mike’s book ...
New

Large Language Models like ChatGPT say The Darnedest Things.
The Errors They MakeWhy We Need to Document Them, and What We Have Decided ...
New
Categories:
Sub Categories:
Popular Portals
- /elixir
- /rust
- /ruby
- /wasm
- /erlang
- /phoenix
- /keyboards
- /rails
- /js
- /python
- /security
- /go
- /swift
- /vim
- /clojure
- /emacs
- /haskell
- /java
- /onivim
- /svelte
- /typescript
- /crystal
- /c-plus-plus
- /kotlin
- /tailwind
- /gleam
- /ocaml
- /react
- /flutter
- /elm
- /vscode
- /ash
- /opensuse
- /centos
- /php
- /deepseek
- /html
- /zig
- /scala
- /textmate
- /sublime-text
- /debian
- /nixos
- /lisp
- /agda
- /react-native
- /kubuntu
- /arch-linux
- /revery
- /ubuntu
- /spring
- /manjaro
- /django
- /diversity
- /nodejs
- /lua
- /c
- /slackware
- /julia
- /markdown