[Parrot-users] does, multi sub, or.... more language philosophy

Jonathan "Duke" Leto jonathan at leto.net
Wed Jul 6 18:19:14 UTC 2011


Howdy,

Yes, I would agree that if "there are only vectors" you will have simpler code,
because no runtime detection of something being a scalar or vector needs to
happen. This could allow many algorithms to be parallelized more simply, and
probably makes the code easier/less expensive to JIT as well.

Duke

On Wed, Jul 6, 2011 at 10:54 AM, Jay Emerson <jayemerson at gmail.com> wrote:
> Thanks to Will Coleda for letting me about 'does' (which is terribly
> hard to google, sadly), and providing a concise multi sub example as
> an alternative.  I see how both work.  The language I'm working on in
> its most basic form (R) has no scalar:
>
> a = 5
> b = 1:3
>
> Both are vectors, the first of length 1, the second of length 3.  I
> would think there is a certain simplicity to this, as subsequent
> methods would only be needed for arrays (handling the length
> appropriately for the context) rather than treating the former as an
> object of a different type.  However, maybe I'm thinking at the
> "high-level" of the user rather than the "low-level" of the
> implementation of the language.  Any advice?
>
> Jay
>
>
> --
> John W. Emerson (Jay)
> Associate Professor of Statistics
> Department of Statistics
> Yale University
> http://www.stat.yale.edu/~jay
> _______________________________________________
> Parrot-users mailing list
> Parrot-users at lists.parrot.org
> http://lists.parrot.org/mailman/listinfo/parrot-users
>



-- 
Jonathan "Duke" Leto <jonathan at leto.net>
209.691.DUKE // http://leto.net
NOTE: Personal email is only checked twice a day at 10am/2pm PST,
please call/text for time-sensitive matters.


More information about the Parrot-users mailing list