Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Perl6: Smart match CAN'T BE that smart

Name: Anus 2011-10-12 11:03

Hi /fags/

From: http://perlgeek.de/blog-en/perl-6/three-functions-of-smartmatch.writeback



In Perl 5, if you want to match a regex against a particular string, you write $string =~ $regex.

In the design process of Perl 6, people have realized that you cannot only match against regexes, but lots of other things can act as patterns too: types (checking type conformance), numbers, strings, junctions (composites of values), subroutine signatures and so on. So smart matching was born, and it's now written as $topic ~~ $pattern. Being a general comparison mechanism is the first function of the smart match operator.


If you keep reading, you will see that they found this operator to be rather problematic... I would like to know y'oure opinion.

Personally, I would have prefered to go the Perl5 way: =~

Name: Anonymous 2011-10-12 11:06

>>1
Lisp had it long before Perl.

found this operator to be rather problematic...
because Perl is a rather problematic, just like every other crappy scripting language out here.

Name: Anonymous 2011-10-12 11:34

>>2
Lisp sucks dicks.

Name: Anonymous 2011-10-12 12:11

ln -s /dev/random prog_browser.pl

Name: Anonymous 2013-08-31 7:31


Ernst Friedrich Ferdinand Zermelo (German: [ʦɛrˈmeːlo]; 1871–1953) was a German logician and mathematician, whose work has major implications for the foundations of mathematics.

Name: Anonymous 2013-08-31 8:16


Assuming the axiom of choice and, given an infinite cardinal π and a non-zero cardinal μ, there exists a cardinal κ such that μ · κ = π if and only if μ ≤ π. It will be unique (and equal to π) if and only if μ < π.

Name: Anonymous 2013-08-31 9:01


 If a set is too large to be put in one to one correspondence with the positive integers, it is called uncountable. Cantor's views prevailed and modern mathematics accepts actual infinity. Certain extended number systems, such as the hyperreal numbers, incorporate the ordinary (finite) numbers and infinite numbers of different sizes.

Name: Anonymous 2013-08-31 9:46


Just as arithmetic features binary operations on numbers, set theory features binary operations on sets. The:

Name: Anonymous 2013-08-31 10:32


A famous problem is the normal Moore space question, a question in general topology that was the subject of intense research. The answer to the normal Moore space question was eventually proved to be independent of ZFC.

Name: Anonymous 2013-08-31 11:17


The statement of the axiom of choice does not specify whether the collection of nonempty sets is finite or infinite, and thus implies that every finite collection of nonempty sets has a choice function. However, that particular case is a theorem of Zermelo–Fraenkel set theory without the axiom of choice (ZF); it is easily proved by mathematical induction.

Don't change these.
Name: Email:
Entire Thread Thread List