Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

FP6: Types

5 views
Skip to first unread message

Autrijus Tang

unread,
Feb 3, 2005, 11:13:30 AM2/3/05
to perl6-l...@perl.org
Today I've started implementing typing relations for value types in
FP6. I intend to hold off subtyping until the simple types can be
checked and matched against smoothly. The types are currently:

VBool Boolean
VInt Integer
VNum Number
VStr String
VRef Reference
VPair Pair
VList Lazily evaluated list
VRoutine Nameable executable objects
VBlock Unnameable executable objects

Implementation types are:

IScalar Perl scalar
IArray Perl array
IHash Perl hash

This list differs from S06v6's "Types" section, in that S06 did
not list which types are I-Types (implementation types) and which are
V-Types (value types). Also "Pair" is not listed among standard types.

Hence, the list above reflects my current intuition, based on
past experience with Perl5's tie() system. If my intuition are way off
base, please do let me know. :-)

Thanks,
/Autrijus/

Autrijus Tang

unread,
Feb 3, 2005, 11:38:49 AM2/3/05
to "perl6-langu...@autrijus.org
On Fri, Feb 04, 2005 at 12:19:36AM +0800, Autrijus Tang wrote:
> Uh, as this is an ask-for-clarification for a Synopsis, I think p6l
> is the correct forum. Of course, as I'm new to this list, I may be
> totally wrong, in which case please tell me so. :-)

To be more precise, according to S06:

"A value type is given as a prefix or with the 'returns' or 'of' keywords."
"The implementation type is given as a trait for the variable via 'is'."

It seems clear to me that the distinction is visible in a language level;
as I'm implementing the parser, this is crucial information to me, and
I suspect perl6-internals won't be of much help here...

Another interpretation is that there is only one default I-Type, namely Scalar,
and Array and Hash are merely V-Types types. In that case, I'd like to
inquire whether Lists and Arrays are always intercastable.

Thanks,
/Autrijus/

(PS: Mark, your server is blocking my email server at 168.95.4.166,
so I'm replying your mail on-list. I'm sorry for the spamming. :-/)

Mark J. Reed

unread,
Feb 3, 2005, 11:17:50 AM2/3/05
to Autrijus Tang, perl6-l...@perl.org

On 2005-02-03 at 11:13:30, Autrijus Tang wrote:
> Today I've started implementing typing relations for value types in
> FP6. ...

Shouldn't this have gone to perl6-internals, not perl6-language?

Autrijus Tang

unread,
Feb 3, 2005, 11:19:36 AM2/3/05
to Mark J. Reed, Autrijus Tang, perl6-l...@perl.org

Uh, as this is an ask-for-clarification for a Synopsis, I think p6l


is the correct forum. Of course, as I'm new to this list, I may be
totally wrong, in which case please tell me so. :-)

Thanks,
/Autrijus/

Autrijus Tang

unread,
Feb 3, 2005, 12:28:42 PM2/3/05
to st...@payrard.net, perl6-l...@perl.org
On Thu, Feb 03, 2005 at 06:18:33PM +0100, St廧hane Payrard wrote:
> perl6-c...@perl.org seems a good forum to me for your endeavor
> because you write a compiler for a subset of Perl6.

Okay. If that is the desired forum, tomorrow I'll switch my questions
to p6c and unsubscribe from p6l. Sorry for bothering the people
involved. :-)

> You are speaking of types, do you intend to explore type inference?

Yes, eventually.

> The problem is more complex than with statically typed language, but
> somewhat simplified by the choice of a purely functional subset of Perl6.

Which is why I started with such a subset...

Thanks,
/Autrijus/

Stéphane Payrard

unread,
Feb 3, 2005, 12:18:33 PM2/3/05
to perl6-l...@perl.org
On Thu, Feb 03, 2005 at 11:17:50AM -0500, Mark J. Reed wrote:
>

perl6-c...@perl.org seems a good forum to me for your endeavor


because you write a compiler for a subset of Perl6.

You are speaking of types, do you intend to explore type inference?

The problem is more complex than with statically typed language, but
somewhat simplified by the choice of a purely functional subset of Perl6.


--
stef

Matt Fowles

unread,
Feb 3, 2005, 1:17:36 PM2/3/05
to Autrijus Tang, st...@payrard.net, perl6-l...@perl.org
Autrijus~

Actually, I think that p6l is the correct place for this discussion.
My logic is that you are asking about specific facets of the language,
not helping the perl 6 compiler or parrot.

Matt


--
"Computer Science is merely the post-Turing Decline of Formal Systems Theory."
-???

Juerd

unread,
Feb 3, 2005, 1:45:34 PM2/3/05
to Stéphane Payrard, perl6-l...@perl.org
Stéphane Payrard skribis 2005-02-03 18:18 (+0100):

> perl6-c...@perl.org seems a good forum to me for your endeavor
> because you write a compiler for a subset of Perl6.

What someone *does* is irrelevant. The topic of the mail message
matters, and if that is the language, this is the right list.

If all the lists are too strictly separated, we end up with two very
different Perl 6s: one that exists only in design and one, made by the
internals people, with awful hacks because the design didn't work that
well in practice.


Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html

0 new messages