2 ms·
There is no specific difference between compile-time and run-time (regular) computing when it comes to testing and documenting it. As for learning something ne
by cracauer 7y ago
There is no specific difference between compile-time and run-time (regular) computing when it comes to testing and documenting it.
As for learning something new, perl6 is a new language, this construct isn't in perl5, so they are in for a learning. In Lisp no language modification was required to enable this functionality in the first place, and so you do not have to learn any new language or language construct.
Yes, you have to learn the library that you or somebody else writes to enable this "enter the data in the safest way possible". But that is learning a library, not a new language, or language evolution.
It goes back to object-oriented programming. How badly did they hack up C compilers to implement either C++ or Objective-C? In Lisp the OO system used to this day was implemented as a compile-time library. A library still used today, too.
You don't have to wait for anybody to hack up the compiler, and test it, and document it, when compile-time computing is part of the language in the first place.
ETA: Another thing you can do with compile-time computing, without waiting for somebody to hack up the compiler:
https://medium.com/@MartinCracauer/static-type-checking-in-the-programmable-programming-language-lisp-79bb79eb068a https://medium.com/@MartinCracauer/static-type-checking-in-t...
- b2gills 7y agoActually this feature is in Perl5, you just have to ask the compiler for a recent enough version. Though it has been marked as experimental because the Perl6 design for this didn't fit into Perl5 as well as was hoped for. That is it had edge-cases that need to be worked through before it is recommended for general use. use v5.10; no warnings qw(experimental); given (1) { when (1) { say 'one' } # only prints this line when (1) { say 1 } }