Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
retrocryptid
on July 23, 2023
|
parent
|
context
|
favorite
| on:
SICP in JavaScript
Except when it's not, like in perl.
balfebs
on July 23, 2023
[–]
Not sure what you mean, but ternaries are right-associative in Perl just like most other languages. PHP is the odd one out.
retrocryptid
on July 24, 2023
|
parent
[–]
Except when they're not.
User23
on July 24, 2023
|
root
|
parent
[–]
And when is that? The docs just say it's right associative[1]. And while it's been a long time since I've written any nontrivial Perl, I don't remember ever having ?: be left associative.
[1]
https://perldoc.perl.org/perlop
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: