diff options
| author | Paul Buetow <paul@buetow.org> | 2022-12-10 13:06:50 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2022-12-10 13:06:50 +0200 |
| commit | 4696f9bdbdfac4f64d52438010104d202d8c9f88 (patch) | |
| tree | 47bd87e7516d97ebcfeb27abe1bd90c2fe679e39 | |
| parent | d256494a4add01a19e87b2701621b61a49dab9f5 (diff) | |
Update content for md
41 files changed, 287 insertions, 46 deletions
diff --git a/gemfeed/2008-06-26-perl-poetry.md b/gemfeed/2008-06-26-perl-poetry.md index 78fea52f..1f77d2f6 100644 --- a/gemfeed/2008-06-26-perl-poetry.md +++ b/gemfeed/2008-06-26-perl-poetry.md @@ -1,6 +1,6 @@ # Perl Poetry -> Published by Paul at 2008-06-26, last updated at 2021-05-04 +> Published by Paul at 2008-06-26 23:43:51 CEST, last updated at 2021-05-04 ``` '\|/' * diff --git a/gemfeed/2008-12-29-using-my-nokia-n95-for-fixing-my-mta.md b/gemfeed/2008-12-29-using-my-nokia-n95-for-fixing-my-mta.md index 1aaff293..dc8fc329 100644 --- a/gemfeed/2008-12-29-using-my-nokia-n95-for-fixing-my-mta.md +++ b/gemfeed/2008-12-29-using-my-nokia-n95-for-fixing-my-mta.md @@ -1,6 +1,6 @@ # Using my Nokia N95 for fixing my MTA -> Published by Paul at 2008-12-29, last updated at 2021-12-01 +> Published by Paul at 2008-12-29 11:10:41 CEST, last updated at 2021-12-01 ``` diff --git a/gemfeed/2010-04-09-standard-ml-and-haskell.md b/gemfeed/2010-04-09-standard-ml-and-haskell.md index ad96610a..ea58d92d 100644 --- a/gemfeed/2010-04-09-standard-ml-and-haskell.md +++ b/gemfeed/2010-04-09-standard-ml-and-haskell.md @@ -1,6 +1,6 @@ # Standard ML and Haskell -> Published by Paul at 2010-04-09 +> Published by Paul at 2010-04-10 00:57:36 CEST I am currently looking into the functional programming language Standard ML (aka SML). The purpose is to refresh my functional programming skills and to learn something new too. Since I already knew a little Haskell, I could not help myself, and I also implemented the same exercises in Haskell. diff --git a/gemfeed/2010-05-07-lazy-evaluation-with-standarn-ml.md b/gemfeed/2010-05-07-lazy-evaluation-with-standarn-ml.md index 1f2f789b..2870f902 100644 --- a/gemfeed/2010-05-07-lazy-evaluation-with-standarn-ml.md +++ b/gemfeed/2010-05-07-lazy-evaluation-with-standarn-ml.md @@ -1,6 +1,6 @@ # Lazy Evaluation with Standard ML -> Published by Paul at 2010-05-07 +> Published by Paul at 2010-05-07 10:17:59 CEST ``` diff --git a/gemfeed/2010-05-09-the-fype-programming-language.md b/gemfeed/2010-05-09-the-fype-programming-language.md index 0e3c9e79..f811f5da 100644 --- a/gemfeed/2010-05-09-the-fype-programming-language.md +++ b/gemfeed/2010-05-09-the-fype-programming-language.md @@ -1,6 +1,6 @@ # The Fype Programming Language -> Published by Paul at 2010-05-09, last updated at 2021-05-05 +> Published by Paul at 2010-05-09 14:48:29 CEST, last updated at 2021-05-05 ``` ____ _ __ diff --git a/gemfeed/2011-05-07-perl-daemon-service-framework.md b/gemfeed/2011-05-07-perl-daemon-service-framework.md index 2516fa42..e3292cf7 100644 --- a/gemfeed/2011-05-07-perl-daemon-service-framework.md +++ b/gemfeed/2011-05-07-perl-daemon-service-framework.md @@ -1,6 +1,6 @@ # Perl Daemon (Service Framework) -> Published by Paul at 2011-05-07, last updated at 2021-05-07 +> Published by Paul at 2011-05-08 00:26:02 CEST, last updated at 2021-05-07 ``` a'! _,,_ a'! _,,_ a'! _,,_ diff --git a/gemfeed/2014-03-24-the-fibonacci.pl.c-polyglot.md b/gemfeed/2014-03-24-the-fibonacci.pl.c-polyglot.md index ef30c230..fe7c4eb9 100644 --- a/gemfeed/2014-03-24-the-fibonacci.pl.c-polyglot.md +++ b/gemfeed/2014-03-24-the-fibonacci.pl.c-polyglot.md @@ -1,6 +1,6 @@ # The fibonacci.pl.raku.c Polyglot -> Published by Paul at 2014-03-24, last updated 2022-04-23 +> Published by Paul at 2014-03-24 23:32:53 CEST, last updated at 2022-04-23 In computing, a polyglot is a computer program or script written in a valid form of multiple programming languages, which performs the same operations or output independent of the programming language used to compile or interpret it. diff --git a/gemfeed/2015-12-05-run-debian-on-your-phone-with-debroid.md b/gemfeed/2015-12-05-run-debian-on-your-phone-with-debroid.md index 76197427..027a02a2 100644 --- a/gemfeed/2015-12-05-run-debian-on-your-phone-with-debroid.md +++ b/gemfeed/2015-12-05-run-debian-on-your-phone-with-debroid.md @@ -1,6 +1,6 @@ # Run Debian on your phone with Debroid -> Published by Paul at 2015-12-05, last updated at 2021-05-16 +> Published by Paul at 2015-12-05 18:12:57 CEST, last updated at 2021-05-16 ``` ____ _ _ _ diff --git a/gemfeed/2016-04-03-offsite-backup-with-zfs.md b/gemfeed/2016-04-03-offsite-backup-with-zfs.md index a8e04aa3..c81d1474 100644 --- a/gemfeed/2016-04-03-offsite-backup-with-zfs.md +++ b/gemfeed/2016-04-03-offsite-backup-with-zfs.md @@ -1,6 +1,6 @@ # Offsite backup with ZFS -> Published by Paul at 2016-04-03 +> Published by Paul at 2016-04-04 00:43:42 GMT ``` ________________ diff --git a/gemfeed/2016-04-09-jails-and-zfs-on-freebsd-with-puppet.md b/gemfeed/2016-04-09-jails-and-zfs-on-freebsd-with-puppet.md index 74b22f65..ad80d6af 100644 --- a/gemfeed/2016-04-09-jails-and-zfs-on-freebsd-with-puppet.md +++ b/gemfeed/2016-04-09-jails-and-zfs-on-freebsd-with-puppet.md @@ -1,6 +1,6 @@ # Jails and ZFS with Puppet on FreeBSD -> Published by Paul at 2016-04-09 +> Published by Paul at 2016-04-09 20:29:47 GMT ``` __ __ diff --git a/gemfeed/2016-04-16-offsite-backup-with-zfs-part2.md b/gemfeed/2016-04-16-offsite-backup-with-zfs-part2.md index 008691ea..84030eb6 100644 --- a/gemfeed/2016-04-16-offsite-backup-with-zfs-part2.md +++ b/gemfeed/2016-04-16-offsite-backup-with-zfs-part2.md @@ -1,6 +1,6 @@ # Offsite backup with ZFS (Part 2) -> Published by Paul at 2016-04-16 +> Published by Paul at 2016-04-17 00:43:42 GMT ``` ________________ diff --git a/gemfeed/2016-05-22-spinning-up-my-own-authoritative-dns-servers.md b/gemfeed/2016-05-22-spinning-up-my-own-authoritative-dns-servers.md index 7d3a65c0..dfb89097 100644 --- a/gemfeed/2016-05-22-spinning-up-my-own-authoritative-dns-servers.md +++ b/gemfeed/2016-05-22-spinning-up-my-own-authoritative-dns-servers.md @@ -1,6 +1,6 @@ # Spinning up my own authoritative DNS servers -> Published by Paul at 2016-05-22 +> Published by Paul at 2016-05-22 20:59:01 GMT ## Background diff --git a/gemfeed/2016-11-20-object-oriented-programming-with-ansi-c.md b/gemfeed/2016-11-20-object-oriented-programming-with-ansi-c.md index adf9d157..71d5174a 100644 --- a/gemfeed/2016-11-20-object-oriented-programming-with-ansi-c.md +++ b/gemfeed/2016-11-20-object-oriented-programming-with-ansi-c.md @@ -1,6 +1,6 @@ # Object oriented programming with ANSI C -> Published by Paul at 2016-11-20, updated 2022-01-29 +> Published by Paul at 2016-11-21 00:10:57 GMT, updated 2022-01-29 ``` ___ ___ ____ ____ diff --git a/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux.md b/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux.md index 3788bd32..eaf80a50 100644 --- a/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux.md +++ b/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux.md @@ -1,6 +1,6 @@ # Realistic load testing with I/O Riot for Linux -> Published by Paul at 2018-06-01, last updated at 2021-05-08 +> Published by Paul at 2018-06-01 16:50:29 GMT, last updated at 2021-05-08 ``` .---. diff --git a/gemfeed/2021-04-22-dtail-the-distributed-log-tail-program.md b/gemfeed/2021-04-22-dtail-the-distributed-log-tail-program.md index cf2c0244..45e9cd0a 100644 --- a/gemfeed/2021-04-22-dtail-the-distributed-log-tail-program.md +++ b/gemfeed/2021-04-22-dtail-the-distributed-log-tail-program.md @@ -1,6 +1,6 @@ # DTail - The distributed log tail program -> Published by Paul at 2021-04-22, last updated at 2021-04-26 +> Published by Paul at 2021-04-22 21:28:41 GMT, last updated at 2021-04-26 [](./2021-04-22-dtail-the-distributed-log-tail-program/title.png) diff --git a/gemfeed/2021-04-24-welcome-to-the-geminispace.md b/gemfeed/2021-04-24-welcome-to-the-geminispace.md index f4c18cd8..9741dc75 100644 --- a/gemfeed/2021-04-24-welcome-to-the-geminispace.md +++ b/gemfeed/2021-04-24-welcome-to-the-geminispace.md @@ -1,6 +1,6 @@ # Welcome to the Geminispace -> Published by Paul at 2021-04-24, last updated at 2021-06-18, ASCII Art by Andy Hood +> Published by Paul at 2021-04-24 21:28:41 GMT, last updated at 2021-06-18, ASCII Art by Andy Hood Have you reached this article already via Gemini? It requires a Gemini client; web browsers such as Firefox, Chrome, Safari, etc., don't support the Gemini protocol. The Gemini address of this site (or the address of this capsule as people say in Geminispace) is: diff --git a/gemfeed/2021-05-16-personal-bash-coding-style-guide.md b/gemfeed/2021-05-16-personal-bash-coding-style-guide.md index 6cf38479..9c50fef4 100644 --- a/gemfeed/2021-05-16-personal-bash-coding-style-guide.md +++ b/gemfeed/2021-05-16-personal-bash-coding-style-guide.md @@ -1,6 +1,6 @@ # Personal Bash coding style guide -> Published by Paul at 2021-05-16 +> Published by Paul at 2021-05-16 16:51:57 GMT ``` .---------------------------. diff --git a/gemfeed/2021-06-05-gemtexter-one-bash-script-to-rule-it-all.md b/gemfeed/2021-06-05-gemtexter-one-bash-script-to-rule-it-all.md index b7d565ca..facc138f 100644 --- a/gemfeed/2021-06-05-gemtexter-one-bash-script-to-rule-it-all.md +++ b/gemfeed/2021-06-05-gemtexter-one-bash-script-to-rule-it-all.md @@ -1,6 +1,6 @@ # Gemtexter - One Bash script to rule it all -> Published by Paul at 2021-06-05 +> Published by Paul at 2021-06-05 21:03:32 GMT ``` o .,<>., o diff --git a/gemfeed/2021-07-04-the-well-grounded-rubyist.md b/gemfeed/2021-07-04-the-well-grounded-rubyist.md index c89da5af..b2478d32 100644 --- a/gemfeed/2021-07-04-the-well-grounded-rubyist.md +++ b/gemfeed/2021-07-04-the-well-grounded-rubyist.md @@ -1,6 +1,6 @@ # The Well-Grounded Rubyist -> Published by Paul at 2021-07-04 +> Published by Paul at 2021-07-04 12:51:23 GMT When I was a Linux System Administrator, I have been programming in Perl for years. I still maintain some personal Perl programming projects (e.g. Xerl, guprecords, Loadbars). After switching jobs a couple of years ago (becoming a Site Reliability Engineer), I found Ruby (and some Python) widely used there. As I wanted to do something new, I decided to give Ruby a go. diff --git a/gemfeed/2021-08-01-on-being-pedantic-about-open-source.md b/gemfeed/2021-08-01-on-being-pedantic-about-open-source.md index 4106af51..5ab1f85e 100644 --- a/gemfeed/2021-08-01-on-being-pedantic-about-open-source.md +++ b/gemfeed/2021-08-01-on-being-pedantic-about-open-source.md @@ -1,6 +1,6 @@ # On being Pedantic about Open-Source -> Published by Paul at 2021-08-01 +> Published by Paul at 2021-08-01 10:37:58 GMT ``` __ diff --git a/gemfeed/2021-09-12-keep-it-simple-and-stupid.md b/gemfeed/2021-09-12-keep-it-simple-and-stupid.md index 165ad8fa..8bf5c12e 100644 --- a/gemfeed/2021-09-12-keep-it-simple-and-stupid.md +++ b/gemfeed/2021-09-12-keep-it-simple-and-stupid.md @@ -1,6 +1,6 @@ # Keep it simple and stupid -> Published by Paul at 2021-09-12, last updated at 2022-04-21 +> Published by Paul at 2021-09-12 09:39:20 GMT, last updated at 2022-04-21 ``` _______________ |*\_/*|_______ diff --git a/gemfeed/2021-10-22-defensive-devops.md b/gemfeed/2021-10-22-defensive-devops.md index 6b05100c..b2cd7603 100644 --- a/gemfeed/2021-10-22-defensive-devops.md +++ b/gemfeed/2021-10-22-defensive-devops.md @@ -1,6 +1,6 @@ # Defensive DevOps -> Published by Paul at 2021-10-22 +> Published by Paul at 2021-10-22 10:02:46 GMT ``` c=====e diff --git a/gemfeed/2021-11-29-bash-golf-part-1.md b/gemfeed/2021-11-29-bash-golf-part-1.md index 567894ec..7fd1ad2b 100644 --- a/gemfeed/2021-11-29-bash-golf-part-1.md +++ b/gemfeed/2021-11-29-bash-golf-part-1.md @@ -1,6 +1,6 @@ # Bash Golf Part 1 -> Published by Paul at 2021-11-29, last updated at 2022-01-05 +> Published by Paul at 2021-11-29 16:06:14 GMT, last updated at 2022-01-05 ``` diff --git a/gemfeed/2021-12-26-how-to-stay-sane-as-a-devops-person.md b/gemfeed/2021-12-26-how-to-stay-sane-as-a-devops-person.md index a933a805..691b1de9 100644 --- a/gemfeed/2021-12-26-how-to-stay-sane-as-a-devops-person.md +++ b/gemfeed/2021-12-26-how-to-stay-sane-as-a-devops-person.md @@ -1,6 +1,6 @@ # How to stay sane as a DevOps person -> Published by Paul at 2021-12-26, last updated at 2022-01-12 +> Published by Paul at 2021-12-26 14:02:02 GMT, last updated at 2022-01-12 ``` ) diff --git a/gemfeed/2022-01-01-bash-golf-part-2.md b/gemfeed/2022-01-01-bash-golf-part-2.md index 78e52420..437d31ce 100644 --- a/gemfeed/2022-01-01-bash-golf-part-2.md +++ b/gemfeed/2022-01-01-bash-golf-part-2.md @@ -1,6 +1,6 @@ # Bash Golf Part 2 -> Published by Paul at 2022-01-01, last updated at 2022-01-05 +> Published by Paul at 2022-01-02 01:36:15 GMT, last updated at 2022-01-05 ``` diff --git a/gemfeed/2022-01-23-welcome-to-the-foo.zone.md b/gemfeed/2022-01-23-welcome-to-the-foo.zone.md index c5794edd..e49b86e2 100644 --- a/gemfeed/2022-01-23-welcome-to-the-foo.zone.md +++ b/gemfeed/2022-01-23-welcome-to-the-foo.zone.md @@ -1,6 +1,6 @@ # Welcome to the foo.zone -> Published by Paul at 2022-01-23 +> Published by Paul at 2022-01-23 18:42:04 GMT ``` __ diff --git a/gemfeed/2022-02-04-computer-operating-systems-i-use.md b/gemfeed/2022-02-04-computer-operating-systems-i-use.md index 9f6e7430..3f335d53 100644 --- a/gemfeed/2022-02-04-computer-operating-systems-i-use.md +++ b/gemfeed/2022-02-04-computer-operating-systems-i-use.md @@ -1,6 +1,6 @@ # Computer operating systems I use(d) -> Published by Paul at 2022-02-04, updated 2022-02-18 +> Published by Paul at 2022-02-04 11:58:22 GMT, updated 2022-02-18 ``` /( )` diff --git a/gemfeed/2022-03-06-the-release-of-dtail-4.0.0.md b/gemfeed/2022-03-06-the-release-of-dtail-4.0.0.md index 5a02236e..c94509d5 100644 --- a/gemfeed/2022-03-06-the-release-of-dtail-4.0.0.md +++ b/gemfeed/2022-03-06-the-release-of-dtail-4.0.0.md @@ -1,6 +1,6 @@ # The release of DTail 4.0.0 -> Published by Paul at 2022-03-06 +> Published by Paul at 2022-03-06 20:11:39 GMT ``` ,_---~~~~~----._ diff --git a/gemfeed/2022-04-10-creative-universe.md b/gemfeed/2022-04-10-creative-universe.md index 07abbd44..a95b3516 100644 --- a/gemfeed/2022-04-10-creative-universe.md +++ b/gemfeed/2022-04-10-creative-universe.md @@ -1,6 +1,6 @@ # Creative universe -> Published by Paul at 2022-04-10, last updated at 2022-04-18 +> Published by Paul at 2022-04-10 12:09:11 GMT, last updated at 2022-04-18 ``` . + . . . . . . diff --git a/gemfeed/2022-05-27-perl-is-still-a-great-choice.md b/gemfeed/2022-05-27-perl-is-still-a-great-choice.md index b09a7c06..1382e6a2 100644 --- a/gemfeed/2022-05-27-perl-is-still-a-great-choice.md +++ b/gemfeed/2022-05-27-perl-is-still-a-great-choice.md @@ -1,16 +1,16 @@ # Perl is still a great choice -> Published by Paul at 2022-05-27, Comic source: XKCD +> Published by Paul at 2022-05-27, last updated at 2022-12-10 Comic source: XKCD [](./2022-05-27-perl-is-still-a-great-choice/regular_expressions.png) -Perl (the Practical Extraction and Report Language) is a battle-tested, mature, multi-paradigm dynamic programming language. Note that it's not called PERL, neither P.E.R.L. nor Pearl. "Perl" is the name of the language and "perl" the name of the interpreter or the interpreter command. +Perl (the Practical Extraction and Report Language) is a battle-tested, mature, multi-paradigm dynamic programming language. Note that it's not called PERL, neither P.E.R.L. nor Pearl. "Perl" is the name of the language and `perl` the name of the interpreter or the interpreter command. Unfortunately (it makes me sad), Perl's popularity has been declining over the last years as Google trends shows: [](./2022-05-27-perl-is-still-a-great-choice/googletrendsperl.jpg) -So why is that? Once the de-facto standard super-glue language for the web nowadays seems to have a bad repetition. Often, people state: +So why is that? Once the de-facto standard super-glue language for the web nowadays seems to have a bad reputation. Often, people state: * Perl is a write-only language. Nobody can read Perl code. * Perl? Isn't it abandoned? It's still at version 5! @@ -66,16 +66,20 @@ So it means that Perl and Raku now exist in parallel. They influence each other, [The OpenBSD Operating System](https://www.OpenBSD.org) [Why does OpenBSD still include Perl in its base installation?](https://news.ycombinator.com/item?id=23360338) -The renaming of Perl 6 to Raku has now opened the door for a future Perl 7. As far as I understand, Perl 7 will be Perl 5 but with modern features enabled by default (e.g. pragmas "use strict; use warnings; use signatures;" and so on. Also, the hope is that a Perl 7 with modern standards will attract more beginners. There aren't many Perl jobs out there nowadays. That's mostly due to Perl's bad (bad for no real reasons) repetition. +The renaming of Perl 6 to Raku has now opened the door for a future Perl 7. As far as I understand, Perl 7 will be Perl 5 but with modern features enabled by default (e.g. pragmas `use strict;`, `use warnings;`, `use signatures;` and so on. Also, the hope is that a Perl 7 with modern standards will attract more beginners. There aren't many Perl jobs out there nowadays. That's mostly due to Perl's bad (bad for no real reasons) reputation. + +> Update 2022-12-10: A reader pointed out, that `use v5.36;` already turns strict, warnings and signatures pragmas automatically on! [Announcing Perl 7](https://www.perl.com/article/announcing-perl-7/) -[What happened to Perl 7? (maybe have to use "use v7;")](http://blogs.perl.org/users/psc/2022/05/what-happened-to-perl-7.html) +[What happened to Perl 7? (maybe have to use `use v7;`)](http://blogs.perl.org/users/psc/2022/05/what-happened-to-perl-7.html) + +> Update 2022-12-10: A reader pointed out, that Perl 7 needs to provide a big improvement to earn and keep the attention for a major version bump. ## Why use Perl as there are better alternatives? Here, common sense must be applied. I don't believe there is anything like "the perfect" programming language. Everyone has got his preferred (or a set of preferred) programming language to chose from. All programming languages come with their own set of strengths and weaknesses. These are the strengths making Perl shine, and you (technically) don't need to bother to look for "better" alternatives: -* Perl is better than Shell/awk/sed scripts. There's a point where shell scripts become fairly complex. The next step-up is to switch to Perl. There are many different versions of shells and awk and sed interpreters. Do you always know which versions (mawk, nawk, gawk, sed, gsed, ...) are currently installed? These commands aren't fully compatible to each other. However, there is only one Perl 5. Simply: Perl is faster, more powerful, more expressive than any shell script can ever be, and it is also extendible through CPAN. Perl can directly talk to databases, which shell scripts can't. +* Perl is better than Shell/AWK/SED scripts. There's a point where shell scripts become fairly complex. The next step-up is to switch to Perl. There are many different versions of shells and AWK and SED interpreters. Do you always know which versions (`mawk`, `nawk`, `gawk`, `sed`, `gsed`, `grep`, `ggrep`...) are currently installed? These commands aren't fully compatible to each other. However, there is only one Perl 5. Simply: Perl is faster, more powerful, more expressive than any shell script can ever be, and it is also extendible through CPAN. Perl can directly talk to databases, which shell scripts can't. * Perl code tends to be compact so that it's much better suitable for "shell scripting" and quick "one-liners" than other languages. In my own experience: Ruby and Python code tends to blow up quickly. It doesn't mean that Ruby and Python are not suitable for this task, but I think Perl does much better. * Perl 5 has proven itself for decades and is a very stable/robust language. It is a battle-tested and mature as something can ever become. * Perl is the reference standard for regular expressions. Even so much that there is a PCRE library (Perl Compatible Regular Expressions) used by many other languages now. Perl fully integrates regular expression syntax into the language, which doesn't feel like an odd add-on like in most other languages. @@ -96,13 +100,13 @@ Here are some reasons why not to chose Perl and look for "better" alternatives: * It's possible to write large programs in Perl (make difficult things possible), but it might not be the best choice here. This also leads back to the clunky object system Perl has. You could write your projects in a procedural or functional style (Perl perfectly fits here), but OOP seems to be the gold standard for large projects nowadays. Functional programming requires a different mindset, and pure procedural programming lacks abstractions. * Apply common sense. What is the skill set your team has? What's already widely used and supported at work? Which languages comes with the best modules for the things you want to work on? Maybe Python is the answer (better machine learning modules). Maybe Perl is the better choice (better Bioinformatic modules). Perhaps Ruby is already the de-facto standard at work and everyone knows at least a little Ruby (as it happened to be at my workplace) and Ruby is "good enough" for all the tasks already. But that's not a hindrance to throw in a Perl one-liner once in a while :P. -[Cor - A minimal object system for the Perl core - proposal](https://gist.github.com/Ovid/68b33259cb81c01f9a51612c7a294ede) +[Cor - Bringing modern OOP to the Perl Core](https://github.com/Ovid/Cor) ## Why all the sigils? It looks like an exploding ASCII factory!! -The sigils $ @ % & (where Perl is famously known for) serve a purpose. They seem confusing at first, but they actually make the code better readable. $scalar is a scalar variable (holding a single value), @array is an array (holding a list of values), %hash holds a list of key-value pairs and &sub is for subroutines. A given variable $ref can also hold reference to something. @$arrayref dereferences a reference to an array, %$hashref to a hash, $$scalarref to a scalar, &$subref dereferences a referene to a subroutine, etc. That can be encapsulated as deep as you want. (This paragraph only scratched the surface here of what Perl can do, and there is a lot of syntactic sugar not mentioned here). +The sigils `$ @ % &` (where Perl is famously known for) serve a purpose. They seem confusing at first, but they actually make the code better readable. `$scalar` is a scalar variable (holding a single value), `@array` is an array (holding a list of values), %hash holds a list of key-value pairs and `&sub` is for subroutines. A given variable `$ref` can also hold reference to something. `@$arrayref` dereferences a reference to an array, `%$hashref` to a hash, `$$scalarref` to a scalar, `&$subref` dereferences a referene to a subroutine, etc. That can be encapsulated as deep as you want. (This paragraph only scratched the surface here of what Perl can do, and there is a lot of syntactic sugar not mentioned here). -In most other programming languages, you won't know instantly what's the "basic type" of a given variable without looking at the variable declaration or the variable name (If named intelligently, e.g. a variable name containing a list of socks is "sock_list"). Even Ruby makes some use of sigils (@ @@ an $), but that's for a different purpose than in Perl (in Ruby it is about object scope, class scope and global scope). Raku uses all the sigils Perl uses plus an additional bunch of twigils, e.g. $.foo for a scalar object variable with public accessors, $!foo for a private scalar object variable, @.foo, @!foo, %.foo, %!foo and so on. Sigils (and twigils) are very convenient once you get used to them. Don't let them scare you off - they are there to help you! +In most other programming languages, you won't know instantly what's the "basic type" of a given variable without looking at the variable declaration or the variable name (If named intelligently, e.g. a variable name containing a list of socks is "sock_list"). Even Ruby makes some use of sigils (`@`, `@@` and `$`), |
