On Wed Apr 16 13:00:06 2014, DOLMEN wrote:
Show quoted text> Le 2013-11-17 08:34:40, LAWALSH a écrit :
> > FWIW, I'm not sure why someone would come up with another function,
> > similar to mem, that didn't have some benefit...
> >
> > Oh well...
>
> me::inlined is the only somewhat useful feature that is present in "mem"
---
me::inlined isn't a feature. It's a poorly documented hack that
doesn't document it's behavior, and wrongly documents the behavior
that it does do.
Show quoted text> That's why Karen created it after discovering "mem".
> The other feature of "mem" is a just a way to hide BEGIN {} blocks.
---
A feature me::inlined also has but doesn't documented. That she would
release a copycat module that doesn't document it's behaviors bespeaks of
intentional deception on the part of the module writer. She is attempting
to hide the fact that her module does the same thing, and is no different
than mem -- just more poorly documented.
Show quoted text> The BEGIN phase and BEGIN {} blocks are unique to Perl. This is a core
> feature of the language and trying to use Perl without understanding
> them by hiding the feature in a module does not solves anything.
----
They are not CORE features any more than than the 1st pass is of
a gcc compiler. It is part of perl's internals that must be resorted
to because Perl lack other facilities like Macros to instantiate things
early. Trying to use necessary features without having to be a perl
internals expert sovles everything. Do you have to know the internals
of printf before using it? All of unicode handling before using it?
Then the learning curve for perl is too high for beginners. That's
a contributory factor to why perl has fallen out of favor in the spotlight.
The learning curve to build good perl programs is too high for beginners
to even try. Any attempts made to simply or leverage the language for
more power are met with active attempts to maintain obfuscation and
the the status quo. Those who point out the self-extincitive nature of
dinosaurs are banned from the p5p list.
Show quoted text> The existence of this module only shows that its author doesn't yet
> understand them or, worse, wants to work without them (some kind of
> "baby Perl").
----
You have validated my creation of the module. The intent was to make
some features easier to use for beginners -- baby's in perl. That you
would actually recognize the the encapsulation of a high level perl
feature as simplified down to a baby's level is marvelous. I'm not sure
it's quite at that simply a level, but I appreciate the acknowledgement.
Yes, I prefer to use a less ugly perl that doesn't expose internals when
necessary. IF I want to get into the internals of perl to hack on it, that's
another matter entirely. But if I am a programmer coming from a generic
programming background, perl goes out of it's way to make things difficult.
Show quoted text> But the power of Perl comes from those features. Trying
> to hide them only makes the code harder to read for Perl programmers
> that know those features.
---
The power of hacking in perl comes from those features. Requiring other
programmers to learn arcane perl internals in order to get type definitions
to be respected (as in use with Exporter), is ugly. I gloss over some of
the uglyness and warts in order to make things more usable. I don't
eschew BEGIN/END blocks in my code in the code section, But requiring
them in headers is plain ugly when the user wants nothing more than to
to export typed functions (as a prime usage example) -- or have any other
array definition & instantiation available at compilation time. Again,
that perl has no other way to do this (like a Macro facility), is a failing
in perl. As you infer, Perl without such powerful abilities is emasculated.
I provide a simple way to use some of those features without arcane knowledge.
That you think that is bad is elitist and insensitive toward those
approaching the language and a reason why perl is in decline.
Show quoted text> Perl is not C or C++. It has its own features/quirks that one has to
> learn to get the best benefit from the language.
---
Perl isn't anything. But someone who knows C can likely program in
Java, or C++, or python among others. That perl requires quirks -- HACKS,
to achieve the same is one of it's failings.
Also FWIW, the copycat module written by karen doesn't even do what it
is documented to do: a testament to the knowledge of the module writer --
and yours since you approve hers over mine. I may provide baby perl, but
at least I understand what I am offering. That your 'choice' module doesn't
document behavior it offers is a deliberate omission of included behavior.
The behavior that it does document doesn't work as documented.
Additionally, mem is tested to work with perl 5.8, the most widely used
perl and has no other dependencies. The same is not true for me::inlined
which has other dependencies not available in perl5.8. I'm fairly certain
that mem would run on 5.6 as well.
So in comparison -- me::inlined offers undocumented features, wrongly
documented features (behaviors), AND is more fragile in its dependencies.
Even if she fixes all those, it won't change the fact that it is a copycat
module that she didn't come up with on her own, but justifies on the basis
of features she has hidden so its not seen as an exactly duplicate.
That you ignore, do not comment on, or don't file errors against her
module, shows you do not really get the nature of the module. That
you recognized my simplifications as a simpler way to access some of
perl's necessary hack to achieve features normally provided in other,
yet justify it on the basis that new or casual users need to know
such internals in order to tap into "power" in perl (what are basic
features in other languages), is a reflection of poor engineering
and design principles.
If I earnestly thought me::inlined was trying to build upon mem, I'd have
no problem point out the flaws in m::i to make it better. As it was
only a mean-spirited copycat attempt, attempting to obfuscate it's
own function and confuse users, I feel no desire or responsibility to do
so.