2020年/01月/03日
编程语言打油诗
If size and performance are key
And you’re happy with malloc and free,
If you’re one of the masses
Who disdain to write classes,
It’s time to start coding in C.
For recursing through various entities
Or traversing a forest of data trees,
I’d say Lisp is the one
For your programming fun,
If by fun you mean lots of parentheses.
I cut back on my usage of braces,
Threw out my selects and my cases.
I was feeling dynamic!
But I started to panic
When I learn of significant spaces.
Oh Java, I’m not being snarky,
But tell me, what is this malarky?
Thought my head would explode
When I looked at the code
And saw pages of class hier-ARCHy.
I know an intelligent girl.
On the keyboard her fingertips twirl.
Soon brackets and slashes
Meet dots bangs and hashes
As she writes her next program in Perl.
They say, “JavaScript’s really quite good.”
That it’s functional under the hood.
That for every mistake
That’s too easy to make,
There’s a “good part” that’s misunderstood.
It gave all our spirits a lift
When Apple unveiled a new gift.
With inferring of types
And bit too much hype
So launches the era of Swift.
C++ for its time was quite neat
As a tool for the coding elite,
But I started to doubt
On the day I found out
That its templates are Turing complete.
The mixing of content and code
Has proven a dangerous road.
And those who agree
All blame PHP
When pages take ages to load.
10
It’s not universal as yet,
But everyone fancies .NET.
Since we all can agree
That it’s sharper than C.
For MS it’s the best you can get.
segue
If you’re looking to program .NET
F# is the language to get.
I once read about LINQ —
It’s quite useful I think,
Though the syntax I sometimes forget.
We’re studying SQL
To save us from database Hell,
And when we speak we’ll
Pronounce it sequel.
(Though spelling it works as well.)
Try making your website come alive
By learning some HTML5!
With new tags galore,
New effects and more,
The future is soon* to arrive!
10 It was back in the days of my youth
20 ‘fore I knew that GOTO was uncouth.
25 I learned how to program
26 With BASIC and FORTRAN.
30 (Not the prettiest code, it’s the truth.)
With all that a website entails
I thought I’d try Ruby on Rails.
The code, it all works,
But the folks were such jerks
I decided to hit the trails.
Objective C, Objective C,
Without you, oh where would we be?
Your syntax is old
(Too verbose we’ve been told)
But as clear as a language can be.
segue
If you’re praising Objective C
I’m afraid that I must disagree.
Those gosh darn brackets!
They’re like straight jackets.
They litter the code like debris.
So Google has come out with Go
Is it good? Well I really don’t know.
It’s another arbitrary
Language proprietary,
To be cancelled before it can grow.
Speaking of cancelling projects
Angular lands with the rejects.
“We’ll support version 2!
And we swear that it’s true!
We’d never be evil at Googleplex.”
20
Remember the promise of Flash
Before it turned out to be trash?
With too many updates,
With adverts and clickbaits,
And bugs that would cause it to crash.
In the low-level language family
You can never exceed assembly.
It’s lightning fast —
I’d say unsurpassed,
Though not very user friendly.
Some programmers back in the day
Used COBOL, I’m sorry to say.
Two digits per year
Was awfully severe:
It left us with Y2K.
It seemed so simple to request
To center text with CSS.
Left-to-right went okay,
But oh dear! I must say
Up-and-down was a terrible mess.
So Pascal, yes I vaguely recall
From a course that I studied one Fall.
Fell asleep in the lecture,
Which makes it conjecture
To remember the language at all.