
CommunityNews
Avoid Yoda conditions in Perl you should
Avoid Yoda conditions in Perl you should—The Phoenix Trap.
Assign not when mean to compare you do. Help you warnings and strictures can.
Read in full here:
https://phoenixtrap.com/2021/12/28/avoid-yoda-conditions-in-perl-you-should/
This thread was posted by one of our members via one of our news source trackers.
Most Liked

davearonson
Not just Perl; this used to be fairly common in C. Eventually we developed the convention that if you really did mean to assign and compare the results of that, as in if (c = getc())
you would wrap it in an extra set of parentheses, like if ((c = getc()))
. Then, the compiler would use that as a “yes I really meant to do that” signal.
On the other claw, Perl never was exactly famous for readability…
2
Popular General Dev topics

Hello Devtalk World!
Please let us know a little about who you are and where you’re from :nerd_face:
New

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

No chair. I have a standing desk.
This post was split into a dedicated thread from our thread about chairs :slight_smile:
New

Curious to know which languages and frameworks you’re all thinking about learning next :upside_down_face:
Perhaps if there’s enough peop...
New

Not sure if following fits exactly this thread, or if we should have a hobby thread…
For many years I’m designing and building model air...
New

The V Programming Language
Simple language for building maintainable programs
V is already mentioned couple of times in the forum, but I...
New

I am thinking in buying one as the second monitor for my Thinkpad while I am travelling:
Anyone has experience in using on...
New

GitHub - hlissner/doom-emacs: An Emacs framework for the stubborn martian hacker.
An Emacs framework for the stubborn martian hacker - G...
New

Big O Notation can make your code faster by orders of magnitude. Get the hands-on info you need to master data structures and algorithms ...
New

Christian Mills - Testing Intel’s Arc A770 GPU for Deep Learning Pt. 2.
This post covers my experience training image classification mod...
New
Other popular topics

I’ve been really enjoying obsidian.md:
It is very snappy (even though it is based on Electron). I love that it is all local by defaul...
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

Not sure if following fits exactly this thread, or if we should have a hobby thread…
For many years I’m designing and building model air...
New

Learn different ways of writing concurrent code in Elixir and increase your application's performance, without sacrificing scalability or...
New

A Hero’s Journey
with Chris Pine
@chrispine
Chris Pine, author of Learn to Program, Third Edition, discusses his journey to beco...
New

Biggest jackpot ever apparently! :upside_down_face:
I don’t (usually) gamble/play the lottery, but working on a program to predict the...
New

Hi folks,
I don’t know if I saw this here but, here’s a new programming language, called Roc
Reminds me a bit of Elm and thus Haskell. ...
New

Author Spotlight:
David Bryant Copeland
@davetron5000
We’re so happy to bring you another Author Spotlight, a series where we sit dow...
New

Inside our android webview app, we are trying to paste the copied content from another app eg (notes) using navigator.clipboard.readtext ...
New

This is a very quick guide, you just need to:
Download LM Studio: https://lmstudio.ai/
Click on search
Type DeepSeek, then select the o...
New
Latest in General Dev
Latest (all)
Categories:
Popular Portals
- /elixir
- /rust
- /wasm
- /ruby
- /erlang
- /phoenix
- /keyboards
- /js
- /rails
- /python
- /security
- /go
- /swift
- /vim
- /clojure
- /java
- /haskell
- /emacs
- /svelte
- /onivim
- /typescript
- /crystal
- /c-plus-plus
- /tailwind
- /kotlin
- /gleam
- /react
- /flutter
- /elm
- /ocaml
- /vscode
- /opensuse
- /ash
- /centos
- /php
- /deepseek
- /scala
- /html
- /zig
- /debian
- /nixos
- /lisp
- /agda
- /react-native
- /textmate
- /sublime-text
- /kubuntu
- /arch-linux
- /ubuntu
- /revery
- /manjaro
- /spring
- /django
- /diversity
- /nodejs
- /lua
- /c
- /slackware
- /julia
- /neovim