Modern Programming
-
Eh, reads pretty naturally to me. That said,
(like I lisp)
Lisps makes more sense to me though
(if condition a b)
VS
a if condition else b
-
Why do you say it's a pile of garbage?
Because of all the garbage
-
You clearly haven't used Perl a lot. Perl's ternary looks like:
$even = $num % 2 ? "nay" : "yay";
Incidentally, it is also the same as PHP's, but mainly because PHP stole it.
You do get the if in the middle of stuff though in the form print(debug message) if $debug
-
Full circle
Make sure the browser is made using Rust and run on a VM running on Linux, compiled to WASM.
-
This post did not contain any content.
Just send pseudo code to AI and compile straight to binary.
-
You do get the if in the middle of stuff though in the form print(debug message) if $debug
Wait until you learn that postfix conditionals are syntactic sugar and the compiler* turns that line into the equivalent of
$debug and print(debug message)
, putting the conditional in first place, a lot like the ternary operator.* Perl compiles to bytecode before running.
The ternary operator itself isn't implemented in terms of
and
(andor
) but it could be. -
Wait until you learn that postfix conditionals are syntactic sugar and the compiler* turns that line into the equivalent of
$debug and print(debug message)
, putting the conditional in first place, a lot like the ternary operator.* Perl compiles to bytecode before running.
The ternary operator itself isn't implemented in terms of
and
(andor
) but it could be.Luckily I don't need to read or write bytecode and all that matters to me is the syntax
-
Because of all the garbage
Clearly the garbage collector is too effective
-
Lisps makes more sense to me though
(if condition a b)
VS
a if condition else b
I was more talking about
(+ a b)
and such. -
The ternary syntax is really my only real gripe with python design -- putting the conditional BETWEEN the true and false values feels so very messy to me.
At least you guys have ternary syntax cries in kotlin.
-
You clearly haven't used Perl a lot. Perl's ternary looks like:
$even = $num % 2 ? "nay" : "yay";
Incidentally, it is also the same as PHP's, but mainly because PHP stole it.
perl -e 'print "fart\n" if 1;'
-
You know, the stuff in @_
heheh. I wasn't really making an argument though
-
heheh. I wasn't really making an argument though
The joke was that Perl is a clusterfuck
-
The joke was that Perl is a clusterfuck
It certainly has its issues. I find that the things people have trouble with are the things I tend to like about it. Of course, reading it later is a problem sometimes.
Write only language!
I still reach for it sometimes.
-
Clearly the garbage collector is too effective
No they're not supposed to be piling it up
-
It certainly has its issues. I find that the things people have trouble with are the things I tend to like about it. Of course, reading it later is a problem sometimes.
Write only language!
I still reach for it sometimes.
The point of code is to be read by other humans, not just computers.
-
The point of code is to be read by other humans, not just computers.
Sure. Nothing stopping you writing readable well commented perl. Just avoid some of the more terse statements. It can be a challenge though.
Shrug. If you don't like Perl, don't use it.
-
Sure. Nothing stopping you writing readable well commented perl. Just avoid some of the more terse statements. It can be a challenge though.
Shrug. If you don't like Perl, don't use it.
But I want to mock it good-naturedly, too.
-
Sure. Nothing stopping you writing readable well commented perl. Just avoid some of the more terse statements. It can be a challenge though.
Shrug. If you don't like Perl, don't use it.
A lots of things stop you from writing readable Perl code.
You have to forget half of the syntax first. Set perlcritic to max. Force whitespaces.
Download ton of packages for every little thing and hope they are cool with each other.
And still deal with edge cases that make you pluck your eyes out.
-
A lots of things stop you from writing readable Perl code.
You have to forget half of the syntax first. Set perlcritic to max. Force whitespaces.
Download ton of packages for every little thing and hope they are cool with each other.
And still deal with edge cases that make you pluck your eyes out.
FVO readable for future me, it's not so bad. I don't have to worry about other people so much.